You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Raghunath Krishnan (JIRA)" <ji...@codehaus.org> on 2014/03/02 09:31:59 UTC
[jira] (SUREFIRE-845) Ability to specify TestNG test names in
plugin configuration
[ https://jira.codehaus.org/browse/SUREFIRE-845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=342276#comment-342276 ]
Raghunath Krishnan commented on SUREFIRE-845:
---------------------------------------------
I am also looking for same kind of approach. TestNg has the -testnames in command line options, which we want in surefire as well just like in the sample provided by Baron above.
> Ability to specify TestNG test names in plugin configuration
> ------------------------------------------------------------
>
> Key: SUREFIRE-845
> URL: https://jira.codehaus.org/browse/SUREFIRE-845
> Project: Maven Surefire
> Issue Type: New Feature
> Components: TestNG support
> Affects Versions: 2.12
> Reporter: Baron Roberts
>
> TestNG provides the capability on its command line to specify the name of tests to run when using a testng.xml suite file. This is very useful for selectively running tests while still using a testng.xml suite file. It would be a very useful feature to be able to specify the names of tests to run within the surefire plugin configuration. Something like:
> {noformat}
> <configuration>
> <suiteXmlFiles>
> <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
> </suiteXmlFiles>
> <testnames>regularTests,longTests</testnames>
> </configuration>
> {noformat}
> Which would correspond to the testng.xml file:
> {noformat}
> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
> <suite name="TestSuite" verbose="2">
> parameter name="saveBytes" value="false"/>
> <test name="regularTests">
> <groups>
> <run>
> <exclude name="foo"/>
> </run>
> </groups>
> <packages>
> <package name="com.mycompany.joe.*"/>
> </packages>
> </test>
> <test name="longTests">
> <packages>
> <package name="com.mycompany.joe.*"/>
> </packages>
> </test>
> </suite>
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)