Test Suites
Test suites allow you to group and run multiple tests together. Through these endpoints, you can trigger runs for individual suites or all suites in a project.
The suite run model
The suite run model contains information about test suite executions, including their status and timing information.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the suite run.
- Name
status
- Type
- string
- Description
Current status of the run. Can be one of: queued, running, success, failed, idle, canceled, resumed
- Name
startedAt
- Type
- timestamp
- Description
When the suite run was started.
- Name
links
- Type
- object
- Description
- Name
status
- Type
- string
- Description
URL to check the run status.
Trigger a suite run
This endpoint allows you to trigger all tests within a specific suite.
Required parameters
- Name
projectId
- Type
- string
- Description
The ID of the project containing the suite.
- Name
suiteId
- Type
- string
- Description
The ID of the suite to run.
Optional attributes
- Name
overrideDomain
- Type
- string
- Description
The suite start URL to override the default one.
Request
curl -X POST https://api.magicinspector.com/v1/projects/proj_123/suites/suite_123/trigger-run \
-H "X-Api-Key: {your-api-key}" \
-d '{"overrideDomain": "https://staging.example.com"}'
Response
{
"data": [
{
"id": "run_123",
"status": "queued",
"startedAt": null,
"links": {
"status": "https://api.magicinspector.com/v1/projects/proj_123/runs/run_123/status"
}
}
]
}
Trigger all suites
This endpoint allows you to trigger all suites within a project simultaneously.
Required parameters
- Name
projectId
- Type
- string
- Description
The ID of the project containing the suites.
Optional attributes
- Name
overrideDomain
- Type
- string
- Description
The suite start URL to override the default one.
Request
curl -X POST https://api.magicinspector.com/v1/projects/proj_123/suites/trigger-all \
-H "X-Api-Key: {your-api-key}" \
-d '{"overrideDomain": "https://staging.example.com"}'
Response
{
"data": [
{
"id": "run_123",
"status": "queued",
"startedAt": null,
"links": {
"status": "https://api.magicinspector.com/v1/projects/proj_123/runs/run_123/status"
}
},
{
"id": "run_124",
"status": "queued",
"startedAt": null,
"links": {
"status": "https://api.magicinspector.com/v1/projects/proj_123/runs/run_124/status"
}
}
]
}