I want to run single test class from command line using Maven and TestNG
Things that doesn\'t work:
mvn -Dtest=ClassName test
I have de
In order to run a single test you need the following from official documentation
mvn -Dtest=MyFirstTest test
or
mvn -Dtest=MyFirstTest,MySecondTest test
This is tested (and working) on maven 3.
Then you can avoid using the profiles. I had the same problem as I needed to run load test in isolation and using profiler in parallel to get the real figures.
Note: Not sure why but make sure that the switches come before the phase i.e. "-Dtest=MyFirstTest" before "test" otherwise it is not working (Mac OSX)