Test exception occurs when unit tests are in progress
pom.xmldepend on the following
<Dependency>
<GroupId>org.junit.jupiter</GroupId>
<Artifactid>junit-jupiter-api</Artifactid>
<Version>release</Version>
</Dependency>
<Dependency>
<GroupId>junit</groupid ;
<artifactid >junit </artifactid ;
<version >4.3 </version ;
<scope >test < /scope ;
</dependency ;
cause of the problem
error in the pom.xml dependency, look closely at the console output and you will find that IntelliJ idea is trying to run my test case using JUNIT5.
/span>
com.intellij.junit5.JUnit5IdeaTestRunner.createListeners(JUnit5IdeaTestRunner.java:39)
By pom.xml discovering that I wanted to run the test case using JUnit4.12, we looked at the pom.xml discovery that junit-jupiter-api this dependency could lead to this error.
<dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-api</artifactId> <version>RELEASE</version></dependency>
Solution Solutions
1. pom.xml Dependencies in org.junit.jupiter deletion
2. Reimport all Maven Project
< span>
JUnit Test exception occurred: Exception in thread "main" java.lang.NoSuchMethodError:org.junit.platform.commons.util.