Authentication
On GitHub Actions, use OIDC through the publishedtestdriverai/action. Then
there is no TD_API_KEY secret to store, copy, or change. The action shows that the
workflow runs in your org. TestDriver changes that proof for your
team’s key at run time. See the GitHub Actions tab below.
For other CI providers (or self-hosted runners without OIDC), use a
stored API key from console.testdriver.ai/settings.
Add it as a TD_API_KEY secret in the settings of your CI provider.
Never commit your API key in the code. Always use OIDC or the secrets management of your CI provider.
CI Provider Examples
- GitHub Actions
- GitLab CI
- CircleCI
- Azure Pipelines
- Jenkins
Authenticate with OIDC via testdriverai/action (recommended)
Use the published testdriverai/action. It makes the OIDC token, changes it for your team’s API key, and exports TD_API_KEY for the steps that come after. There is no TD_API_KEY secret to store or change.Do this one time: authorize the TestDriver GitHub App for your org. Then the org → team binding exists. If your org authorized the App before OIDC support was available, authorize it again one time. If the App is not authorized, the action fails with a console link. (Or it uses the
api-key secret if you give one.).github/workflows/testdriver.yml
Stored-key fallback
Only if you can’t use OIDC (e.g. self-hosted runners without an OIDC provider). Add the key as a secret and pass it viaenv:- Navigate to your GitHub repository
- Go to Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
TD_API_KEY, Value: your API key - Click Add secret
Basic Workflow
Create.github/workflows/testdriver.yml:.github/workflows/testdriver.yml
Parallel Execution
Use matrix strategy to run tests in parallel:.github/workflows/testdriver-parallel.yml
Multi-Platform Testing
.github/workflows/testdriver-multiplatform.yml
Reading Platform in Tests
When using multi-platform testing, read theTD_OS environment variable in your test:
tests/cross-platform.test.mjs
Concurrency limits
Your plan allows a fixed number of sandboxes running at once. When a test asks for a sandbox and you’re already at that limit, the request is queued rather than failed immediately: the SDK waits for a slot to free up, retrying every 10 seconds, then proceeds automatically once one opens. This is what lets a parallel CI matrix (many jobs starting at once) work on a plan with fewer slots than jobs — the extra jobs simply wait their turn instead of erroring. By default the SDK waits up to 60 seconds for a slot before giving up with a concurrency-limit error. Control that ceiling withTD_CONCURRENCY_MAX_WAIT:
The value is in seconds (fractional values are allowed and rounded to the
nearest millisecond). Any invalid or negative value falls back to the 60-second
default. The wait applies per sandbox request, across both the initial allocation
and the realtime slot-approval handshake.
Viewing Results
All test runs are automatically recorded and visible in your TestDriver dashboard at console.testdriver.ai:- All test runs with pass/fail status
- Video replays of each test
- Error messages and screenshots on failure
- Git commit and branch information
- Duration trends over time

