Skip to main content
PUT
/
api
/
test-runs
Create Test Run
curl --request PUT \
  --url https://dash.empirical.run/api/test-runs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "environment": "<string>",
  "build": {
    "url": "<string>",
    "branch": "<string>",
    "commit": "<string>",
    "commit_url": "<string>",
    "version": "<string>"
  },
  "metadata": {},
  "environment_variables_overrides": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ]
}
'
{
  "data": {
    "trigger": {
      "success": true
    },
    "test_run": {
      "id": 123,
      "state": "<string>",
      "test_run_branch": "<string>",
      "created_at": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

API key from the Empirical dashboard.

Body

application/json

Test run to create.

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.

Response

Created test run.

data
object
required