intellij-ideajunitjunit5junit-jupiter

Problem when running unit test with Junit5


I'm trying to do some units tests but no matter what, I always received the following error: java.lang.NoClassDefFoundError: org/junit/jupiter/api/extension/ScriptEvaluationException

This is from the POM:

Pom's

I think that my IDE is not recognizing the library itself.

This is the outcome when I put this mvn dependency:tree -Dincludes=:jupiter-api dependecy tree

I'm using IntelliJ Ultimate IntelliJ IDEA 2023.3.2 and JDK 17.0.2.


Solution

  • I removed from my POM the <version> of each dependency of the <groupId> that has Jupiter and updated BOM's in the <properties> tag.