Skip to main content

Environment Variables

Environment variables can be set in Test Run Engine (TRE) during its deployments, such as secrets (e.g., database passwords) or configurations to use in a test. More details on setting them can be found in Deploy TRE.

Referencing

In TesmonLang

Tesmon Test YML
variable: ${{env.ENV_VAR_NAME}}

Example

tests.yml
resources:
- id: postgresDb
type: DB::POSTGRESQL
props:
username: ${{env.postgresUsername}}
password: ${{env.postgresPassword}}
...

In Script

Python Script
variable = "${{env.ENV_VAR_NAME}}"

Example

script.py
postgresUsername = "${{env.postgresUsername}}"