Skip to content
Advertisement

Does Parameterized JUnit test correct with `mvn test`?

I’m just implemented a JUnit test case using JUnit 4.11 following the example:

https://github.com/junit-team/junit/blob/master/doc/ReleaseNotes4.11.md#example-1

I create a maven project using

JavaScript

And this test case:

JavaScript

But when I test it using mvn test , maven said:

JavaScript

How to make it work?

Advertisement

Answer

The problem is the naming convention of maven which is based on maven-surefire-plugin which needs a naming like Test.java, Test.java or TestCase*.java for unit tests. For integration tests the maven-failsafe-plugin is responsible which has the naming convention IT*.java, *IT.java or *ITCase.java.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement