# Parallel Tests: Java Agents

The Lab ID groups two or more instances of the Test Listener as running under the same environment, for the same application:

<figure><img src="https://4057366433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAjqTCMRYvHhDgsdPLUnc%2Fuploads%2F1xDVvWAJL9bzR977Aewq%2Fimage2020-1-5_15-39-25.png?alt=media&#x26;token=5329834d-09b3-43bc-9d6e-7d8f0b825275" alt=""><figcaption></figcaption></figure>

For proper configuration that will allow parallel testing, the following MUST be configured under the same Lab ID:

1. The application under test which runs with the [installing-the-coverage-listener-as-a-jvm-java-agent](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/default-usage-cli/installing-the-coverage-listener-as-a-jvm-java-agent "mention")
2. The test runner(s) which starts and ends the Test Stage (see diagram)

The following example contains the configuration relevant to the QA-1 Lab, which appears in the diagram as the instance displayed on the far-left hand side:

{% code overflow="wrap" lineNumbers="true" %}

```
//Lab ID implemented on the application server JVM:
-javaagent:/path/to/sl-test-listener.jar -Dsl.tags=backend -Dsl.tokenFile=/path/to/sltoken.txt -Dsl.buildSessionIdFile=buildSessionId.txt -Dsl.labId=QA-1

//Lab ID implemented in the Test Stage start/end commands:
java -jar sl-test-listener.jar start -tokenfile /path/to/sltoken.txt -buildsessionidfile buildSessionId.txt -testStage "Functional Tests" -labid QA-1
// <Run your tests in between these two commands>
java -jar sl-test-listener.jar end -tokenfile /path/to/sltoken.txt -buildsessionidfile buildSessionId.txt -labid QA-1
```

{% endcode %}

&#x20;
