/
Running integration tests using FailSafe
Running integration tests using FailSafe
Configuring the Maven plugin in the pom.xml file
The below is handled automatically when using the automatic pom integration (Scanning Builds and Tests using SeaLights Maven plugin - Automatic configuration) with build scanner 2.0.1045 and up
When working with failsafe, you need to update the argLine of failsafe to include the SeaLights test listener and a testStage definition.
Here is a sample configuration for failsafe with the updated argLine at line 8:
<configuration>
</configuration>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven.failsafe.plugin.version}</version>
<configuration>
<argLine>${argLine} @{sealightsArgLine} -Dsl.testStage="Integration Tests"</argLine>
<includes>
<include>**/IT/**/*Test*</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
You can set an empty property called sealightsArgLine so that the build will not fail when the SeaLights maven plugin doesn't run
<properties>
...
<sealightsArgLine></sealightsArgLine>
</properties>
Note: As the integration tests usually run against a server, you also need to set it up with the SeaLights test listener as a javaagent
See 'Java Command Reference - Installing test listener as Java Agent' for more parameter values and information
Related content
Scanning Builds and Capturing Unit Tests using the SeaLights Maven plugin
Scanning Builds and Capturing Unit Tests using the SeaLights Maven plugin
More like this
Packaging the SeaLights Test Listener
Packaging the SeaLights Test Listener
More like this
Java - How to configure Surefire integration
Java - How to configure Surefire integration
Read with this
Maven build tool - Sealights plugin
Maven build tool - Sealights plugin
More like this
Running Tests (Only) using SeaLights Gradle plugin (JSON file)
Running Tests (Only) using SeaLights Gradle plugin (JSON file)
Read with this
Running Tests (Only) using Sealights Maven plugin
Running Tests (Only) using Sealights Maven plugin
More like this