If you don't want to all the tests run in a class when you are trying to run a single test of a method. You should select "Skip Tests".
Or cancel "Delegate IDE... to Maven "
JUnit is not available in a project run by Idea.
Error:
org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
Solution:
The reason is as same as it in the 1. Just deselect "Delegate IDE build..."
1, An error occurs in a project of Idea. The exception is as follows.
command line is too long also for junit
Solution:
In "Shorten command line" select JAR manifest.
NoClassDefFoundError: org/springframework/core/CollectionFactory
-
The following test throws "NoClassDefFoundError: org/springframework/core/CollectionFactory".
-
The reason, which I guess, is the version of servlet-api(3.1.0) is different from
the one which is 2.4 in "spring-mock" dependency.
-
Reason:
-
!!! How stupid I was. The exception stated clearly that there is no "CollectionFactory" which is
a class of Spring Core. Just import the dependency!!
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<!--Write a proper version correspond to spring-mock-->
<version>${spring-core.version}</version>
<scope>compile</scope>
</dependency>
Error: module was compiled with an incompatible version of kotlin
Try going to Build menu and choose Rebuild project.