DataTrue exposes a REST based API to allow tests and suites to be run from external systems such as a continuous integration (CI) environment.
The CI API requires an API key to be provided in the Authorization
header. The API key used to access the CI API can be found within
your User Profile.
Trigger a test run for a Test or a Suite
required | object Options for the test run |
object Variables to set for the test run |
{- "test_run": {
- "test_class": "Test",
- "test_id": 0,
- "email_users": [
- 0
], - "draft_tag_id": 0
}, - "variables": {
- "property1": "string",
- "property2": "string"
}
}
{- "id": 0,
- "title": "string",
- "job_id": "string"
}
Retrieve the progress for a test run
testRunId required | number ID of the test run you wish to retrieve the progress for |
{- "status": "queued",
- "num": 0,
- "total": 0,
- "progress": {
- "percentage": 0,
- "steps_total": 0,
- "tests": [
- {
- "test_result_id": 0,
- "id": 0,
- "name": "string",
- "state": "success",
- "running": true,
- "actions_completed": 0,
- "actions_total": 0,
- "pii": {
- "num_pii_exposure": 0,
- "num_pii_data_types": 0,
- "num_pii_data_processors": 0
}
}
]
}
}
Retrieve the progress for a test run using the job ID
jobId required | number ID of the job you wish to retrieve the progress for |
{- "status": "queued",
- "num": 0,
- "total": 0,
- "progress": {
- "percentage": 0,
- "steps_total": 0,
- "tests": [
- {
- "test_result_id": 0,
- "id": 0,
- "name": "string",
- "state": "success",
- "running": true,
- "actions_completed": 0,
- "actions_total": 0,
- "pii": {
- "num_pii_exposure": 0,
- "num_pii_data_types": 0,
- "num_pii_data_processors": 0
}
}
]
}
}