[
https://issues.apache.org/jira/browse/SUREFIRE-1841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17196512#comment-17196512
]
BJ Cardon commented on SUREFIRE-1841:
-------------------------------------
Hello, if I find some time in the near future I can try to look into it further
from a code perspective. However, I did create a small application example that
exhibits the same behavior.
[https://github.com/cardonator/demo]
In this project, if you runĀ
{code:java}
mvn test -Pintegration -pl demo-integration
{code}
You will see that the TestSuite is discovered and the tests are run. This is on
Surefire 3.0.0-M3. If you change to 3.0.0-M4 or higher and run the same
command, it will not find the TestSuite at all or run any tests.
> <suiteXmlFiles> no longer finds tests starting with 3.0.0-M4
> ------------------------------------------------------------
>
> Key: SUREFIRE-1841
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1841
> Project: Maven Surefire
> Issue Type: Bug
> Components: TestNG support
> Affects Versions: 3.0.0-M4
> Reporter: BJ Cardon
> Priority: Major
>
> Hello. I have a fairly simple multi-module project where I'm using the
> surefire plugin to execute a series of integration tests in one of the
> modules. I am doing this by defining a profile in the module that runs one of
> my suite XML files.
> Here is my profile definition in the POM.
> {noformat}
> <profile>
> <id>acceptance</id>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>3.0.0-M4</version>
> <configuration>
> <useFile>false</useFile>
> <suiteXmlFiles>
>
> <suiteXmlFile>src/test/resources/jenkins/acceptance-testng.xml</suiteXmlFile>
> </suiteXmlFiles>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </profile>{noformat}
> In previous versions of the plugin, including in 3.0.0-M3, this works and the
> suite is found and executed. In 3.0.0-M4, the test suite is not found and the
> tests don't run at all. The same behavior is observed in 3.0.0-M5.
> Here is my `acceptance-testng.xml` file
> {noformat}
> <!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >
> <suite name="Acceptance Test Suite" verbose="1">
> <test name="Group 1 Acceptance Tests" parallel="methods" thread-count="4">
> <groups>
> <run>
> <!-- to exclude a test from Acceptance test run, add test to
> one of these groups -->
> <exclude name="fragile"/>
> <exclude name="load"/>
>
> <!-- This testuite will only run tests that belong to the
> 'acceptance' group -->
> <include name="acceptance"/>
> </run>
> </groups>
> <classes>
> <class name="com.company.app.integration.suite.rest.AppRestTest"/>
> <class
> name="com.company.app.integration.suite.rest.AppRestErrorTest"/>
> <class name="com.company.app.integration.suite.rest.AppAuthTest"/>
> <class name="com.company.app.integration.suite.rest.AppLoadTest"/>
> </classes>
> </test>
> <test name="Group 2 Acceptance Tests" parallel="classes" thread-count="4">
> <groups>
> <run>
> <!-- to exclude a test from Acceptance test run, add test to
> one of these groups -->
> <exclude name="fragile"/>
> <exclude name="load"/>
> <!-- This testuite will only run tests that belong to the
> 'acceptance' group -->
> <include name="acceptance"/>
> </run>
> </groups>
> <classes>
> <class
> name="com.company.app.integration.suite.vendor.VendorRestTest"/>
> <class
> name="com.company.app.integration.suite.vendor.VendorRestErrorTest"/>
> <class
> name="com.company.app.integration.suite.vendor.VendorAuthTest"/>
> <class
> name="com.company.app.integration.suite.vendor.VendorLoadTest"/>
> </classes>
> </test>
> </suite>{noformat}
> As stated above, this broke sometime between 3.0.0-M3 and 3.0.0-M4. I tried
> looking through the changelog (on a tangent, the changelogs linked from the
> ASF page require creating an account in Jira which seems odd) but it seems
> like a number of fairly large changes were made in 3.0.0-M4 that could have
> been to blame for this change in behavior.
> Let me know if I can provide any additional context.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)