Skip to main content
Environment variables allow you to parameterize your tests with environment-specific values like URLs, credentials, API keys, and configuration settings.

Variable Types

Store base domains and Full URLs for your application.Common uses:
  • Homepage URL
  • PDP Pages
  • Spurmail Pages
Example:
Variable: Home Page
- Development: https://dev.example.com
- Staging: https://staging.example.com
- Production: https://example.com
URL variables are validated to ensure they’re valid URLs. They must include the protocol (http:// or https://).
Store a Username and Password combination to be used in all HTTPS requests.Common uses:
  • Staging Authentication
  • Bypassing firewalls
Example:
Variable: Staging Login
- Development-- Username: admin@dev.com, Password: *****
- Staging: admin@staging.com, Password: *****
- Production: (Not Required)
Encrypted variables to store values useable in test steps.Common uses:
  • Username/Passwords combinations for different environments
  • OAuth client secrets
Example:
Variable: Password (Secret)
- Development: dev_key_xxxxx
- Staging: stg_key_xxxxx
- Production: prod_key_xxxxx
Secret variables are write-only after creation. You can replace them but cannot view the current value.
Custom HTTP headers sent with every request in that environment.Common uses:
  • Environment identifiers
  • API version headers
  • Authorization headers
  • Custom tracking headers
Example:
{
  "X-Environment": "staging",
  "X-Client-Version": "2.0",
  "X-Test-Run": "true"
}
Headers are useful for feature flags or routing requests to specific backend services.

Adding a new environment variable

Required vs Optional Variables

Mark a variable as required for each environment, to mark if the environment must have a value for the variable.

Adding a new environment variable

Required Variables Must have values in all environments before tests can run.

When to use:
  • URLs that tests depend on
  • Essential credentials

Creating Variables

1

Navigate to Environment Settings

Go to Settings → Environments in your application dashboard.
2

Select an Environment

Click on the environment where you want to add a variable.
3

Add New Variable

Click “Add Variable” and provide:
  • Alias - Unique identifier (e.g., BASE_URL)
  • Type - URL, Credential, Secret, Header, or Route Override
  • Required - Whether it must exist in all environments
  • Value - The value for this environment
4

Set Values for Other Environments

If required, provide values for all other environments.
5

Save

Click “Save” to create the variable.

Adding a new environment variable

Managing Variables

Updating Values

  1. Navigate to Environments settings
  2. Select the environment
  3. Click on the variable to edit
  4. Update the value
  5. Save changes
Changes take effect immediately for new test runs. In-progress tests use the values from when they started.

Deleting Variables

Before deleting:
  • Ensure no tests reference this variable
  • Check test suites and scenario tables
  • Verify no scheduled tests use it
You cannot delete a variable that’s being used in active tests. Update or remove the references first.

Troubleshooting

Possible causes:
  • Variable marked as optional and not set for that environment
  • Typo in variable alias
  • Test not mapped to the environment
Solution: Check environment mapping and variable spelling
Cause: Variable is referenced in active testsSolution:
  1. Find tests using this variable
  2. Update tests to remove reference
  3. Try deleting again

Next Steps