Skip to content

Commit

Permalink
Add FAQ for wrong gradle configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor authored Jan 9, 2024
1 parent 889859a commit b0b5ad3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,3 +388,31 @@ from JUnit Platform 1.3](https://junit.org/junit5/docs/current/user-guide/#runni

The test logger plugin however, is fully compatible with the [Gradle native way](https://docs.gradle.org/current/userguide/java_testing.html#using_junit5) of
using JUnit 5.

### I see the test output twice. How can I fix it?

Example:

```text
> Task :myTest
org.project.MyTest
Test test() FAILED
org.opentest4j.AssertionFailedError: expected: <Optional[String]> but was: <Optional.empty>
MyTest > test() FAILED
org.opentest4j.AssertionFailedError: expected: <Optional[String]> but was: <Optional.empty>
at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
```

Then, you still have `testLogging` of gradle enabled. Example setting:


```groovy
testLogging {
events = ["FAILED"]
exceptionFormat "full"
}
```

Solution: Remove that setting from your `build.gradle`.

0 comments on commit b0b5ad3

Please sign in to comment.