Tuesday, July 24, 2012

How to run a single test with maven

Everyone knows that in order to run a single test with maven all you need is simple
mvn test -Dtest=<your_test_class_name>
Almost everyone knows how to run single test method:
mvn test -Dtest=<your_test_class_name>#<your_test_method_name>
But it all works (at least - for sure) with maven-surefire-plugin, version 2.9. Current latest version 2.12 simply fails with "No tests found" error.

No comments:

Post a Comment