fix to run testng in functional and integration tests

This commit is contained in:
Michael Suzuki 2014-09-05 14:06:34 +01:00
parent 6076eecf4c
commit dab870c8f5

View File

@ -760,118 +760,120 @@
</build> </build>
</profile> </profile>
<profile> <profile>
<id>ui-test</id> <id>ui-test</id>
<properties> <properties>
<maven.tomcat.fork>true</maven.tomcat.fork> <maven.tomcat.fork>true</maven.tomcat.fork>
</properties> </properties>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId> <artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version> <version>1.7</version>
<executions> <executions>
<execution> <execution>
<id>add-integration-source</id> <id>add-integration-source</id>
<phase>pre-integration-test</phase> <phase>pre-integration-test</phase>
<goals> <goals>
<goal>add-test-source</goal> <goal>add-test-source</goal>
</goals> </goals>
<configuration> <configuration>
<sources> <sources>
<source>src/integration/java</source> <source>src/integration/java</source>
</sources> </sources>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>2.5</version> <version>2.5</version>
<executions> <executions>
<execution> <execution>
<id>add-integration-resources</id> <id>add-integration-resources</id>
<phase>pre-integration-test</phase> <phase>pre-integration-test</phase>
<goals> <goals>
<goal>copy-resources</goal> <goal>copy-resources</goal>
</goals> </goals>
<configuration> <configuration>
<outputDirectory>${project.build.directory}/integration-classes</outputDirectory> <outputDirectory>${project.build.directory}/integration-classes</outputDirectory>
<resources> <resources>
<resource> <resource>
<directory>src/integration/resources</directory> <directory>src/integration/resources</directory>
</resource> </resource>
</resources> </resources>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- In this case the maven-compiler-plugin must be located after the build-helper-maven-plugin --> <!-- In this case the maven-compiler-plugin must be located after the build-helper-maven-plugin -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version> <version>2.3.2</version>
<executions> <executions>
<execution> <execution>
<id>compile-integration-test</id> <id>compile-integration-test</id>
<phase>pre-integration-test</phase> <phase>pre-integration-test</phase>
<goals> <goals>
<goal>testCompile</goal> <goal>testCompile</goal>
</goals> </goals>
<configuration> <configuration>
<compilerArguments> <compilerArguments>
<d>${project.build.directory}/integration-classes</d> <d>${project.build.directory}/integration-classes</d>
</compilerArguments> </compilerArguments>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version> <version>2.9</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId> <artifactId>maven-failsafe-plugin</artifactId>
<version>2.9</version> <version>2.10</version>
<configuration> <configuration>
<testSourceDirectory>src/integration/java</testSourceDirectory> <testSourceDirectory>src/integration/java</testSourceDirectory>
<testClassesDirectory>${project.build.directory}/integration-classes</testClassesDirectory> <testClassesDirectory>${project.build.directory}/integration-classes</testClassesDirectory>
<test>**/*.java</test> <suiteXmlFiles>
</configuration> <suiteXmlFile>src/integration/resources/testng.xml</suiteXmlFile>
<executions> </suiteXmlFiles>
<execution> </configuration>
<id>integration-test</id> <executions>
<goals> <execution>
<goal>integration-test</goal> <id>integration-test</id>
</goals> <goals>
</execution> <goal>integration-test</goal>
<execution> </goals>
<id>verify</id> </execution>
<goals> <execution>
<goal>verify</goal> <id>verify</id>
</goals> <goals>
</execution> <goal>verify</goal>
</executions> </goals>
</plugin> </execution>
</plugins> </executions>
</plugin>
</plugins>
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.testng</groupId> <groupId>org.testng</groupId>
<artifactId>testng</artifactId> <artifactId>testng</artifactId>
<version>6.8.8</version> <version>6.8.8</version>
<scope>test</scope> <scope>test</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.hamcrest</groupId> <groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId> <artifactId>hamcrest-core</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
</dependencies> </dependencies>
</profile> </profile>
</profiles> </profiles>
</project> </project>