Surefire Integration Setup

How to configure Surefire integration

Problem

The Plugin Engine detects an invalid Surefire configuration

Cause

Overridden argLine

circle-exclamation

By default, the SeaLights Maven plugin sets the argLine used by Surefire to include the SealIghts test listener as a javaagent. If the Surefire argLine is overridden, then the SeaLights argLine will not be used and hence test information will not be captured.

Solution

For this, the SeaLights Maven plugin also generates a property called sealightsArgLine, which can be placed in the Surefire argLine for easy configuration. Note: Using of @{sealightsArgLine} demands minimum surefire-plugin version 2.17

Here is a sample configuration for Surefire with the updated argLine at line 8:

  <plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-surefire-plugin</artifactId>
	<version>${surefire-plugin.version}</version>
	<configuration>
      <argLine>-Xms512m -Xmx1024m @{sealightsArgLine}</argLine>
	</configuration>
    ...

You can set an empty property called sealightsArgLine so that the build will not fail when the SeaLights maven plugin doesn't run

Last updated

Was this helpful?