By default Maven uses the following naming conventions when looking for tests to run:
Test*
*Test
*Tests
(has been added in Maven Surefire Plugin 2.20)*TestCase
If your test class doesn’t follow these conventions you should rename it or configure Maven Surefire Plugin to use another pattern for test classes.
Related Contents:
- Running junit tests in parallel in a Maven build?
- Surefire is not picking up Junit 5 tests
- How to run JUnit tests by category in Maven?
- Java 9 + maven + junit: does test code need module-info.java of its own and where to put it?
- Maven dependencies are failing with a 501 error
- Conditionally ignoring tests in JUnit 4
- Testing two JSON objects for equality ignoring child order in Java [closed]
- JUnit 5: How to assert an exception is thrown?
- Get source JARs from Maven repository
- How to Re-run failed JUnit tests immediately?
- Maven: best way of linking custom external JAR to my project?
- How to mock private method for testing using PowerMock?
- Maven – Always download sources and javadocs
- NoClassDefFoundError on Maven dependency
- Populating Spring @Value during Unit Test
- The method getDispatcherType() is undefined for the type HttpServletRequest
- Mock a constructor with parameter
- Assert equals between 2 Lists in Junit
- Changing names of parameterized tests
- java.lang.OutOfMemoryError: Java heap space in Maven
- Package a non-modular JavaFX application
- Rollback transaction after @Test
- maven jacoco: not generating code coverage report
- Junit – run set up method once
- Is there a way to run MySQL in-memory for JUnit test cases?
- How do I ignore certain elements when comparing XML?
- Using Eclipse Java Compiler (ecj) in maven builds
- How to set JVM parameters for Junit Unit Tests?
- Access maven properties defined in the pom
- How to mock new Date() in java using Mockito
- Maven Java Version Configuration ignored by Eclipse/Idea
- Maven surefire could not find ForkedBooter class
- stop IntelliJ IDEA to switch java language level every time the pom is reloaded (or change the default project language level)
- Why am I getting a “401 Unauthorized” error in Maven?
- Adding resources in IntelliJ for Maven project
- Forming Mockito “grammars”
- Running a specific Maven plugin goal from the command line in a sub-module of a multi-module reactor project
- Creating Two Executable Jars Using maven-assembly-plugin
- Multiple install:install-file in a single pom.xml
- How to find/remove unused dependencies in Gradle
- Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory
- Maven build Compilation error : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Maven
- How to run a maven created jar file using just the command line
- java.io.StreamCorruptedException: invalid stream header: EFBFBDEF
- Maven doesn’t recognize sibling modules when running mvn dependency:tree
- JUnit test with dynamic number of tests
- Maven dependency resolution (conflicted)
- Testing against Java EE 6 API
- How to rollback a database transaction when testing services with Spring in JUnit?
- Maven not picking JAVA_HOME correctly