Configuring Test Project ID

Configuration

You can configure Test Project ID using either:

  1. Command-line parameter (when running your test agent)

  2. 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:

Integration Steps

  1. Integrate with your Gradle project:

  1. Run your tests:

  1. Restore build files:

Last updated

Was this helpful?