Configuring Test Project ID
Configuration
You can configure Test Project ID using either:
Command-line parameter (when running your test agent)
Environment variable (set in your CI/CD pipeline or test environment)
Option 1: Command-Line Parameter
The exact CLI parameter depends on your test runner technology. Refer to your technology-specific documentation for the correct parameter name and syntax.
General pattern:
<your-test-runner-command> --test-stage=regression --test-project-id="Product A"Option 2: Environment Variable
Set the following environment variable before running your tests:
export SL_TEST_PROJECT_ID="Product A"Example in CI/CD pipeline:
# Jenkins, GitLab CI, etc.
environment:
SL_TEST_PROJECT_ID: "Product A"Technology-Specific Configuration
Gradle
Add testProjectId to your sl-config.json configuration file to distinguish test stages with the same name (e.g., "Component Tests" or "BDD Tests") when triggered by different teams or test sets.
When to use:
Multiple teams run the same test stage name against the same application
You need separate tracking of test results from different sources
Different pipelines execute identical test stages concurrently
Example scenario: Team A and Team B both run "BDD Tests" against the same application. Using different testProjectId values ensures their results are tracked separately in the SeaLights Dashboard.
Configuration
Gradle Plugin 4.0.1013 and later — add testProjectId to sl-config.json:
Older versions — you must also pass the value via sealightsJvmParams:
Recommendation: Use the latest version of the SeaLights Java agent. From Gradle Plugin 4.0.1013+, only the testProjectId field in sl-config.json is required.
Integration Steps
Integrate with your Gradle project:
Run your tests:
Restore build files:
Last updated
Was this helpful?

