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 Troubleshooting section to README #418

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,32 @@ error message.
## Contributing to assertk

Contributions are more than welcome! Please see the [Contributing Guidelines](https://github.com/willowtreeapps/assertk/blob/main/Contributing.md) and be mindful of our [Code of Conduct](https://github.com/willowtreeapps/assertk/blob/main/code-of-conduct.md).

## Troubleshooting

### I'm seeing a java.lang.NoClassDefFoundError: org/opentest4j/AssertionFailedError

It might happen that your tests are failing with something like:

```
java.lang.AssertionError: java.lang.NoClassDefFoundError: org/opentest4j/AssertionFailedError

at me.tatarka.open4jideissuetest.ExampleUnitTest.addition_isCorrect(ExampleUnitTest.kt:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
[...]
```

It's a [known issue](https://youtrack.jetbrains.com/issue/IDEA-214533) and there is a workaround. You can add:

```
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1")
```
or
```
testImplemetation("org.opentest4j:opentest4j:1.1.1")
```

to your `build.gradle*` file 👍