Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

JUnit Tests are executed via IDE but can't execute via maven job on Jenkins

Open 1 Answers 44 Views
0 1

I have created a Maven project and set it up on Jenkins as a maven build. When I execute mvn clean test, it does not recognize my tests.

Here is test file name:

It has one @Test annotation.

1 Answer

Maven surefire plugin will recognize a test class that has name starting with

Test or TestCase

or ending with


So, rename your class and it will work.
answered by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.