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.


POST/v1/projects/{projectId}/suites/{suiteId}/trigger-run

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

POST
/v1/projects/proj_123/suites/suite_123/trigger-run
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"
      }
    }
  ]
}

POST/v1/projects/{projectId}/suites/trigger-all

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

POST
/v1/projects/proj_123/suites/trigger-all
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"
      }
    }
  ]
}

Was this page helpful?