Jori created SUREFIRE-1514:
------------------------------

             Summary: Selecting multiple tests does not work when tests are 
inside parent class
                 Key: SUREFIRE-1514
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1514
             Project: Maven Surefire
          Issue Type: Bug
          Components: Maven Failsafe Plugin, TestNG support
    Affects Versions: 2.21.0
            Reporter: Jori


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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to