KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to use testng with the Surefire plug-in of Maven . The idea is to tag some tests with a group integrationTest and run the plug-in twice: for goal test excluding the group integrationTest and for goal integration-test including the group integrationTest only. I found some material for running the plug-in for both goals and that works, but the group for the second run does not work (no test is executed). Here is the plug-in configuration in the build element of my pom.xml : <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> <excludedGroups>integrationTest</excludedGroups> <reportFormat>brief</reportFormat> <trimStackTrace>true</trimStackTrace> <useFile>false</useFile> </configuration> <executions> <execution> <id>integration-test</id> <phase>integration-test</phase> <goals> <goal>test</goal> </goals> <configuration> <groups>integrationTest</groups> <excludedGroups/> <reportsDirectory>${project.build.directory}/surefire-reports/integration</reportsDirectory> </configuration> </execution> </executions> </plugin> Any idea? mvn integration-test runs all unit tests as expected (excluding the group integrationTest ) but the second test run just
Tags (comma-separated)
Save Edits
Cancel