Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.21.0
-
None
-
None
Description
I'm using TestNG to run tests with Maven Failsafe plugin version 2.21.0. I'm trying to follow instructions over at http://maven.apache.org/surefire/maven-failsafe-plugin/examples/single-test.html for running multiple tests in a single class:
mvn -Dit.test=ITCircle#testOne+testTwo verify
This works fine as long as testOne and testTwo are defined inside the class ITCircle. However, it does not work if ITCircle is a subclass of class ParentClass which holds the test methods.
So basically my structure is
testpackage
- ParentClass
- public void setup
- public void test1
- public void test2
- SubClass extends ParentClass
- public void setup
mvn -Dit.test=testpackage.ParentClass verify - OK (2 tests ran)
mvn -Dit.test=testpackage.ParentClass#test1+test2 verify - OK (2 tests ran)
mvn -Dit.test=testpackage.SubClass verify - OK (2 tests ran)
mvn -Dit.test=testpackage.SubClass#test1+test2 verify - No tests found