How to get more junit-failed-details in gradle log without running gradle in debug mode

k3b

Question:

Is there a way to add the details of failed junit4 tests to gradle output witout making all of gradle more verbose?

Background:

I have a java-se junit4 regression test for handling ical content that works fine on my win-7-64 local machine but that fails on travis-ci buildserver using gradle.

when i run

./gradlew assemble libIcsJ2se:test

the gradle output from travis-ci log contains this

* What went wrong:

Execution failed for task ':libIcsJ2se:test'.

> There were failing tests. See the report at: 
> file:///home/travis/build/k3b/CalendarIcsAdapter/libIcsJ2se/build/reports/tests/index.html

However i have no access to this file because it is on the build server so i cannot find out wich test failed and why.

when i run gradle in debug mode

./gradlew -d assemble libIcsJ2se:test

I see this in the log what i want:

07:06:56.713 [DEBUG] [TestEventLogger] de.k3b.calendar.DtoIcRegressonsTests > shouldBeSameFixThisEvent STARTED
07:06:56.713 [DEBUG] [TestEventLogger] 
07:06:56.713 [DEBUG] [TestEventLogger] de.k3b.calendar.DtoIcRegressonsTests > shouldBeSameFixThisEvent FAILED
07:06:56.714 [DEBUG] [TestEventLogger]     org.junit.ComparisonFailure: expected:

<...
TART:20000502T123456
[DTEND:20000502T171234]
SUMMARY:test title
...> but was:<...
TART:20000502T123456[Z
DTEND:20000502T171234Z]
SUMMARY:test title
...>
07:06:56.717 [DEBUG] [TestEventLogger]         at de.k3b.calendar.DtoIcRegressonsTests.shouldBeSameFixThisEvent(DtoIcRegressonsTests.java:482)

However the gradle debug output contains many more details unrelated to junit-tests.

Is there a way to add only the details of the failed junit4 tests to gradle output witout making all of gradle more verbose?

Vampire

Please read the documentation of TestLoggingContainer to see how to configure what is logged when running tests.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Gradle console - get more log output

From Dev

Gradle daemon not reused when running in debug mode (in IntelliJ IDEA)

From Dev

How to get output of gradle --debug in Android Studio?

From Dev

How to enable debug on my JUnit through Gradle test task

From Java

How to debug SpringBoot using Gradle commandline parameter, without suspending server?

From Dev

How to debug SpringBoot using Gradle commandline parameter, without suspending server?

From Dev

Gradle project running jUnit 5 tests in IntelliJ

From Dev

Gradle project running jUnit 5 tests in IntelliJ

From Dev

JHipster & Gradle: Running Junit tests from STS

From Java

How to run JUnit tests with Gradle?

From Dev

How to get Gradle 1.9 in android-studio 0.3.6 running?

From Dev

How can I get Gradle to add file deletion to the log output?

From Dev

How to configure log levels in Gradle?

From Dev

How to configure log levels in Gradle?

From Dev

Gradle - Jacoco code coverage without running connectedCheck

From Dev

Running Gradle Build From Eclipse without test

From Dev

Gradle - Jacoco code coverage without running connectedCheck

From Dev

How to debug a Gradle build.gradle file (in a debugger, with breakpoints)?

From Dev

Stop debug mode in IntelliJ IDEA when using Gradle

From Dev

How to get lead details without API details?

From Dev

How to get lead details without API details?

From Dev

How to run a gradle JUnit test job without source files but with a fat jar?

From Dev

How do I get G1 to print more log details?

From Dev

How do I get G1 to print more log details?

From Dev

How to run jUnit test in specific folder by gradle?

From Dev

"Address already in use: bind" exception when running Gradle JUnit tests

From Dev

How to use gradle without maven

From Dev

How to debug build.gradle execution?

From Dev

How to debug Play 2 Application built with Gradle

Related Related

  1. 1

    Gradle console - get more log output

  2. 2

    Gradle daemon not reused when running in debug mode (in IntelliJ IDEA)

  3. 3

    How to get output of gradle --debug in Android Studio?

  4. 4

    How to enable debug on my JUnit through Gradle test task

  5. 5

    How to debug SpringBoot using Gradle commandline parameter, without suspending server?

  6. 6

    How to debug SpringBoot using Gradle commandline parameter, without suspending server?

  7. 7

    Gradle project running jUnit 5 tests in IntelliJ

  8. 8

    Gradle project running jUnit 5 tests in IntelliJ

  9. 9

    JHipster & Gradle: Running Junit tests from STS

  10. 10

    How to run JUnit tests with Gradle?

  11. 11

    How to get Gradle 1.9 in android-studio 0.3.6 running?

  12. 12

    How can I get Gradle to add file deletion to the log output?

  13. 13

    How to configure log levels in Gradle?

  14. 14

    How to configure log levels in Gradle?

  15. 15

    Gradle - Jacoco code coverage without running connectedCheck

  16. 16

    Running Gradle Build From Eclipse without test

  17. 17

    Gradle - Jacoco code coverage without running connectedCheck

  18. 18

    How to debug a Gradle build.gradle file (in a debugger, with breakpoints)?

  19. 19

    Stop debug mode in IntelliJ IDEA when using Gradle

  20. 20

    How to get lead details without API details?

  21. 21

    How to get lead details without API details?

  22. 22

    How to run a gradle JUnit test job without source files but with a fat jar?

  23. 23

    How do I get G1 to print more log details?

  24. 24

    How do I get G1 to print more log details?

  25. 25

    How to run jUnit test in specific folder by gradle?

  26. 26

    "Address already in use: bind" exception when running Gradle JUnit tests

  27. 27

    How to use gradle without maven

  28. 28

    How to debug build.gradle execution?

  29. 29

    How to debug Play 2 Application built with Gradle

HotTag

Archive