Skip to content
You're viewing the v2 docs. Looking for v1?Go to v1 docs
Docs
Testsigma
Popular questions
↑↓ to navigate↵ to selectesc to close
Book a demo

Fetch test case results

GET/test_runs/{run_id}/test_case_results/{case_result_id}
Base URL https://app.testsigma.com/api/v2Region

Fetch the execution results for a specific test case within a test plan run.

Authenticate with your API key as a Bearer token in the Authorization header. How to authenticate →
run_idThe test plan run ID.
case_result_idThe test case result ID to fetch.
queryFilter using <parameter><operator><value> chained with commas, e.g. query=testPlanId:1,result:PASSED
idTest case result ID.
testCaseIdID of the test case.
startTimeTest case run start time.
endTimeTest case run end time.
durationDuration in milliseconds.
resultResult for this test case.
isDisabledWhether the test case is disabled.
isDataDrivenWhether the test case is data-driven.
metricsObject with aggregated pass/fail/count metrics for the test case.
appDetailsApplication details for the run, if any.
Request
curl -X GET \
  'https://app.testsigma.com/api/v2/test_runs/{run_id}/test_case_results/{case_result_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}/test_case_results/{case_result_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}/test_case_results/{case_result_id}',
  headers={
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  }
)
data = response.json()
Response200 OK
{
  "id": 3857,
  "testCaseId": 609,
  "startTime": "2024-05-29T07:29:31Z",
  "endTime": "2024-05-29T07:29:55Z",
  "duration": 23038,
  "result": "FAILURE",
  "isDisabled": false,
  "isDataDriven": false,
  "metrics": {
    "id": 1089,
    "testCaseResultId": 3857,
    "testSuiteResultId": 1383,
    "testDeviceResultId": 1434,
    "testPlanResultId": 517,
    "totalCount": 6,
    "failedCount": 1,
    "passedCount": 3,
    "stoppedCount": 0,
    "notExecutedCount": 2,
    "queuedCount": 0,
    "skippedCount": 0,
    "runningCount": 0,
    "result": "FAILURE",
    "latestResult": "FAILURE",
    "duration": 23038,
    "consolidatedDuration": 23038
  },
  "appDetails": null
}

Was this page helpful?