Skip to content
Testsigma DOCS

Fetch test plan results

GET/test_runs/{run_id}

Base URL  https://app.testsigma.com/api/v2

Fetch the execution results for an entire test plan run by its run ID.

Authenticate with your API key as a Bearer token in the Authorization header. Generate a key →
run_idThe test plan run ID to fetch results for.
queryFilter using <parameter><operator><value> chained with commas, e.g. query=testPlanId:1,result:PASSED
idTest plan result ID.
testPlanIdID of the test plan.
buildNoBuild number for the run.
resultOverall result of the run.
startTimeRun start time.
endTimeRun end time.
durationRun duration in milliseconds.
executorUser who executed the run.
triggeredTypeHow the run was triggered, e.g. MANUAL.
metricsObject with aggregated pass/fail/count metrics for the plan.
REQUEST
curl -X GET \
  'https://app.testsigma.com/api/v2/test_runs/{run_id}' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json'
const response = await fetch('https://app.testsigma.com/api/v2/test_runs/{run_id}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  }
});
const data = await response.json();
import requests

response = requests.get(
  'https://app.testsigma.com/api/v2/test_runs/{run_id}',
  headers={
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  }
)
data = response.json()
RESPONSE200OK
{
  "id": 517,
  "testPlanId": 420,
  "buildNo": "run69",
  "result": "FAILURE",
  "startTime": "2024-05-29T07:29:19Z",
  "endTime": "2024-05-29T07:33:17Z",
  "duration": 238000,
  "executor": "bharath.k@testsigma.com",
  "triggeredType": "MANUAL",
  "metrics": {
    "id": 162,
    "testPlanResultId": 517,
    "totalCount": 8,
    "failedCount": 4,
    "passedCount": 4,
    "stoppedCount": 0,
    "notExecutedCount": 0,
    "queuedCount": 0,
    "runningCount": 0,
    "consolidatedPlanTotalCount": 8,
    "consolidatedPlanFailedCount": 4,
    "consolidatedPlanPassedCount": 4,
    "consolidatedPlanStoppedCount": 0,
    "consolidatedPlanNotExecutedCount": 0,
    "consolidatedPlanQueuedCount": 0,
    "consolidatedPlanRunningCount": 0,
    "result": "FAILURE",
    "latestResult": "FAILURE",
    "duration": 226000,
    "consolidatedDuration": 226000
  }
}