# 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="/files/RbMpXzu0FpwahaOzYj2A" 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](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/default-usage-cli/installing-the-coverage-listener-as-a-jvm-java-agent.md)
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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/running-parallel-tests-lab-id/parallel-tests-java-agents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
