[ https://issues.apache.org/jira/browse/SUREFIRE-1449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Affleck updated SUREFIRE-1449: ------------------------------------ Description: When I run a command like mvn clean install, instead of running mvn-failsafe, or mvn verify integration tests are run using surefire and not maven failsafe. They seem to only be run using maven failsafe if I explicitly add surefire and configure it to be skipped. I made a git repo for the project. https://github.com/JAffleck/mvn-failsafe-test-ng-example e.g. both commands runs in maven surefire (even if the maven-surefire plugin section) is removed mvn -P WebDriverTests clean install mvn -P WebDriverTests clean verify e.g. command below runs in maven failsafe mvn -P WebDriverTests failsafe:integration-test e.g. here is what my pom can be simplififed to so that there's no profile to run. I didn't see anything in the documentation saying that maven failsafe would be run by maven surefire if you don't explicity use the mvn failsafe:integration-test or that you have to disable the surefire plugin. So this can cause a lot of confusion to someone who thinks they're running testng suite tests in failsafe, but they're getting surefire instead (so builds fail when tests fail). {{pom.xml .... <properties> <jdkVersion>1.7</jdkVersion> </properties> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <!-- copy tests before running integration tests --> <executions> <execution> <phase>test-compile</phase> <goals> <goal>testCompile</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <!--<artifactId>maven-surefire-plugin</artifactId>--> <version>2.20.1</version> <configuration> <useFile>false</useFile> <suiteXmlFiles> <suiteXmlFile>testsuites/testng.xml</suiteXmlFile> </suiteXmlFiles> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> </goals> </execution> </executions> </plugin> </plugins> </build>}} was: When I run a command like mvn clean install, instead of running mvn-failsafe, or mvn verify integration tests are run using surefire and not maven failsafe. They seem to only be run using maven failsafe if I explicitly add surefire and configure it to be skipped. I made a git repo for the project. https://github.com/JAffleck/mvn-failsafe-test-ng-example e.g. both commands runs in maven surefire (even if the maven-surefire plugin section) is removed mvn -P WebDriverTests clean install mvn -P WebDriverTests clean verify e.g. command below runs in maven failsafe mvn -P WebDriverTests failsafe:integration-test e.g. here is what my pom can be simplififed to so that there's no profile to run. I didn't see anything in the documentation saying that maven failsafe would be run by maven surefire if you don't explicity use the mvn failsafe:integration-test or that you have to disable the surefire plugin. So this can cause a lot of confusion to someone who thinks they're running testng suite tests in failsafe, but they're getting surefire instead (so builds fail when tests fail). pom.xml .... <properties> <jdkVersion>1.7</jdkVersion> </properties> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <!-- copy tests before running integration tests --> <executions> <execution> <phase>test-compile</phase> <goals> <goal>testCompile</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <!--<artifactId>maven-surefire-plugin</artifactId>--> <version>2.20.1</version> <configuration> <useFile>false</useFile> <suiteXmlFiles> <suiteXmlFile>testsuites/testng.xml</suiteXmlFile> </suiteXmlFiles> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> </goals> </execution> </executions> </plugin> </plugins> </build> > Integration tests are running in maven-surefire, even though maven-failsafe > plugin is the one explicitly added in pom > --------------------------------------------------------------------------------------------------------------------- > > Key: SUREFIRE-1449 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1449 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Failsafe Plugin > Affects Versions: 2.20.1 > Environment: Windows 7 x64, JDK 1.7.0_79, maven 3.3.9 > Reporter: James Affleck > > When I run a command like mvn clean install, instead of running mvn-failsafe, > or mvn verify integration tests are run using surefire and not maven > failsafe. They seem to only be run using maven failsafe if I explicitly add > surefire and configure it to be skipped. > I made a git repo for the project. > https://github.com/JAffleck/mvn-failsafe-test-ng-example > e.g. both commands runs in maven surefire (even if the maven-surefire plugin > section) is removed > mvn -P WebDriverTests clean install > mvn -P WebDriverTests clean verify > e.g. command below runs in maven failsafe > mvn -P WebDriverTests failsafe:integration-test > e.g. here is what my pom can be simplififed to so that there's no profile to > run. > I didn't see anything in the documentation saying that maven failsafe would > be run by maven surefire if you don't explicity use the mvn > failsafe:integration-test or that you have to disable the surefire plugin. > So this can cause a lot of confusion to someone who thinks they're running > testng suite tests in failsafe, but they're getting surefire instead (so > builds fail when tests fail). > {{pom.xml > .... > <properties> > <jdkVersion>1.7</jdkVersion> > </properties> > ... > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>3.3</version> > <!-- copy tests before running integration tests --> > <executions> > <execution> > <phase>test-compile</phase> > <goals> > <goal>testCompile</goal> > </goals> > </execution> > </executions> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-failsafe-plugin</artifactId> > <!--<artifactId>maven-surefire-plugin</artifactId>--> > <version>2.20.1</version> > <configuration> > <useFile>false</useFile> > <suiteXmlFiles> > <suiteXmlFile>testsuites/testng.xml</suiteXmlFile> > </suiteXmlFiles> > </configuration> > <executions> > <execution> > <goals> > <goal>integration-test</goal> > </goals> > </execution> > </executions> > </plugin> > </plugins> > </build>}} -- This message was sent by Atlassian JIRA (v6.4.14#64029)