Skip to main content
PUT
Trigger a test run

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
environment
string
required

The environment slug to run tests against (e.g., production, staging).

build
object

Build information to associate with the test run.

metadata
object

Custom key-value pairs to associate with the test run. Values must be strings or numbers.

environment_variables_overrides
object[]

Environment variables to override for this test run.

tags
string[]

Tags to filter which tests to run (e.g., @smoke, @critical). Only tests matching these tags will be executed.

test_case_ids
string[]

Specific test case ids (Playwright per-project test.id) to run. Only these tests will be executed.

branch
string

Existing test-repository branch to run. A missing explicit branch creates an errored run; Empirical never creates it. May be supplied alongside build, which describes the application code under test.

trigger
object

The application pull request under test, for pre-merge runs. The run uses the test-repository branch named pull_request.head, merged into the project default branch. If no such branch exists, it uses the default branch. An explicit branch takes precedence.

concurrency
object | null

Concurrency group and policy for this run. Runs in the same group (within the project) are limited to one in progress; on_conflict says what this run does when the group already has an active run: cancel cancels it and starts now, wait queues behind it (a newer waiting run replaces an older one). Omit to use the project's legacy concurrency setting; null for no limit.

rerun_source_id
integer

ID of the test run this run is a rerun of.

Required range: x >= 1
rerun_only_failed
boolean

When rerunning, only re-execute the previously failed tests.

Response

The triggered test run.

data
object
required