Add our agent as a dependency to your Maven or Gradle project. For example, in your pom.xml
:
<properties><scope.agent.version>0.2.4</scope.agent.version></properties>...<dependency><groupId>com.undefinedlabs.scope</groupId><artifactId>scope-agent</artifactId><version>${scope.agent.version}</version><scope>provided</scope></dependency>
Then, configure a Maven plugin or Gradle task to use our agent (see how in our documentation).
Finally, set the Scope DSN as an environment variable:
export SCOPE_DSN=REPLACE_WITH_DSN
After this, you can run your tests as you normally do. For example, with Maven:
mvn clean verify
For more information you may refer to our documentation.