...
To run integration tests, execute the command
mvn install -Ditest
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<build> <plugins> <plugin> <groupId>org.cipango</groupId> <artifactId>cipango-maven-plugin</artifactId> <configuration> <stopKey>foo</stopKey> <stopPort>9999</stopPort> </configuration> </plugin> <!-- Tests in package sipunit are integration tests and so should not be run in maven test phase but in phase integration-test --> <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> <excludes> <exclude>**/sipunit/**</exclude> </excludes> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.cafesip</groupId> <artifactId>sipunit</artifactId> <version>0.0.7b</version> <scope>test</scope> </dependency> </dependencies> <!-- Integrations tests are defined into a profile to allow to install the SIP application without running them. --> <profiles> <profile> <id>itest</id> <activation> <property> <name>itest</name> </property> </activation> <build> <plugins> <plugin> <groupId>org.cipango</groupId> <artifactId>cipango-maven-plugin</artifactId> <executions> <execution> <id>start-cipango</id> <phase>pre-integration-test</phase> <goals> <goal>run</goal> </goals> <configuration> <overrideSipXml>${project.build.testOutputDirectory}/integration/sip-override.xml</overrideSipXml> <scanIntervalSeconds>0</scanIntervalSeconds> <daemon>true</daemon> </configuration> </execution> <execution> <id>stop-cipango</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <executions> <execution> <id>surefire-it</id> <phase>integration-test</phase> <goals> <goal>test</goal> </goals> <configuration> <excludes> <exclude>none</exclude> </excludes> <includes> <include>**/sipunit/**</include> </includes> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> |
...