---
title: Built-in Environment Variables
slug: suite-documentation/built-in-environment-variables
docTags: 
createdAt: 2026-07-07T13:37:48.250Z
---

Similar to system parameters, which allow users to define custom environment variables from the Testinium Suite UI, Testinium Suite also provides a set of built-in environment variables automatically during test execution.

These variables are generated by the execution itself and can be accessed directly from the test automation code. They help users identify the current execution context, generate execution-specific report links, use execution identifiers in test logic, and track retry-related execution information.

## Available Environment Variables

The following built-in environment variables are provided during test execution:

| Environment Variable  | Description                                                                                                                 |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| EXECUTION\_ID         | Represents the related plan execution/run.                                                                                  |
| TEST\_RESULT\_ID      | Represents the current scenario result.                                                                                     |
| SCENARIO\_ID          | Represents the scenario being executed.                                                                                     |
| TOTAL\_RETRY\_COUNT   | Represents the total **Failed Test Retry Count** value configured in the plan. This value does not include the initial run. |
| CURRENT\_RETRY\_COUNT | Represents the current retry attempt number during execution. For the initial run, this value is 0.                         |

## Usage

Users can access these values from their test automation code as environment variables.

Java Example:

```java
String executionId = System.getenv("EXECUTION_ID");
String testResultId = System.getenv("TEST_RESULT_ID");
String scenarioId = System.getenv("SCENARIO_ID");
String totalRetryCount = System.getenv("TOTAL_RETRY_COUNT");
String currentRetryCount = System.getenv("CURRENT_RETRY_COUNT");
```

## Retry Count Behavior

Retry-related variables allow users to understand whether the current execution is the initial run or a retry attempt.

For example, if **Failed Test Retry Count** is set to 2, the execution flow will be:

| Execution Type | TOTAL\_RETRY\_COUNT | CURRENT\_RETRY\_COUNT |
| -------------- | ------------------- | --------------------- |
| Initial run    | 2                   | 0                     |
| First retry    | 2                   | 1                     |
| Second retry   | 2                   | 2                     |

This means:

- When CURRENT\_RETRY\_COUNT is 0, the execution is the initial run.
- When CURRENT\_RETRY\_COUNT is greater than 0, the execution is a retry attempt.
- TOTAL\_RETRY\_COUNT always shows the retry count configured in the plan and does not include the initial run.

## Notes

- Built-in environment variables are generated automatically during test execution.
- These variables can be used for reporting, debugging, execution tracking, or custom test logic.
- EXECUTION\_ID, TEST\_RESULT\_ID, and SCENARIO\_ID can be used to generate execution-specific report links.
- TOTAL\_RETRY\_COUNT represents the retry count configured in the plan.
- TOTAL\_RETRY\_COUNT does not include the initial run.
- CURRENT\_RETRY\_COUNT is set to 0 for the initial run.
- For retry executions, CURRENT\_RETRY\_COUNT increases sequentially, such as 1, 2, and so on.
- In Random executions, retry count values are handled across the retry flow.
- In Cross executions, CURRENT\_RETRY\_COUNT increases based on retries on the same device.
