You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jori (JIRA)" <ji...@apache.org> on 2018/04/11 09:11:00 UTC

[jira] [Comment Edited] (SUREFIRE-1514) Selecting multiple tests does not work when tests are inside parent class

    [ https://issues.apache.org/jira/browse/SUREFIRE-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16433593#comment-16433593 ] 

Jori edited comment on SUREFIRE-1514 at 4/11/18 9:10 AM:
---------------------------------------------------------

And another addition: it actually seems to break even single test selection when inheritance for tests is involved.

mvn integration-test \-Dit.test=testpackage/SubClass#test1 - works in 2.18.1

mvn integration-test \-Dit.test=testpackage/SubClass#test1 - does not work since 2.19.1


was (Author: buumi):
And another addition: it actually seems to break even single test selection when inheritance for tests is involved.

mvn integration-test -Dit.test=testpackage/SubClass#test1 - works in 2.18.1

mvn integration-test -Dit.test=testpackage/SubClass#test1 - does not work since 2.19.1

> 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
>            Priority: Major
>         Attachments: maven-project.zip
>
>
> 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)