Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FAQ for wrong gradle configuration #335

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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`.