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 07:15:00 UTC
[jira] [Commented] (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=16433506#comment-16433506 ]
Jori commented on SUREFIRE-1514:
--------------------------------
Attached a minimal maven project where above problem occurs.
> 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)