Skip to content
developers
Open TestCollab

Get test plan test cases

GET/testplantestcases

Get list of test cases for a test plan

Use resource IDs from your own project. Keep the API token in your server or CI environment.

example.ts
import { createConfiguration, TestPlanTestCasesApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);
const api = new TestPlanTestCasesApi(config);
const result = await api.getTestPlanTestCases({
"project": 123,
"testplan": 123
});
console.log(result);
Name Location Type Required Description
project query number Yes Project ID
testplan query integer Yes Test Plan ID
_limit query integer No Limit the size of the returned results
_start query integer No Skip a specific number of entries (for pagination)
_sort query string No Sort according to a specific field.
_filter query string No Stringified filter object (the filtering guide)

200 — List of test plan test cases

Field Type Required Description
[].id number Yes —
[].test_case Test Case Minified Yes —
[].test_case.id number Yes —
[].test_case.display_number number No Per-company sequential business id, surfaced in the UI as TC-
[].test_case.title string Yes —
[].test_case.suite number No —
[].test_case.description string Yes Test case description (generated by rich text editor)
[].test_case.steps Step Collection No —
[].test_case.steps[].step string Yes (can contain HTML)
[].test_case.steps[].expected_result string Yes (can contain HTML)
[].test_case.steps[].reusable_step_id number Yes Reusable Step ID
[].test_case.steps_parsed Step Parsed Collection No —
[].test_case.steps_parsed[].step string Yes (can contain HTML)
[].test_case.steps_parsed[].step_id number No —
[].test_case.steps_parsed[].expected_result string Yes (can contain HTML)
[].test_case.steps_parsed[].step_index number No —
[].test_case.steps_parsed[].parsed_reusable_step_id number No —
[].test_case.priority number Yes Priority, 0 - Low, 1- Normal, 2 - High Values: 0, 1, 2.
[].test_case.custom_fields Array of Custom Field Collection Output No Array of custom fields
[].test_case.created_at string No —
[].test_case.updated_at string No —
[].test_case.created_by number No —
[].test_case.last_run_status string No —
[].test_case.run_count number No —
[].test_case.avg_execution_time number No —
[].test_case.last_run_on string No —
[].test_case.failure_rate number No Test failure percentage
[].test_case.is_bdd_managed boolean No True when the test case is managed by BDD sync from a scenario in a feature file in Git.
[].test_case.is_reference boolean No Will be true only for links
[].test_case.source_id number No Only for links - source entity ID
[].test_case.source_project number No Only for links - source Project ID
[].test_case.under_review number No 1 if test case is under review else 0 (applicable when test case review feature is enabled)
[].test_case.is_automated number No Can be considered for execution by copilot (applicable when test case automation feature is enabled)
[].status string Yes This is combined status for whole Test Case across multiple configurations (old values- 0, 1, 2, 3 ,4 and new values- unexecuted, passed, failed, skipped, blocked)
[].time_taken number Yes Time taken (in seconds)
[].avg_time_per_exec number Yes Time spent per execution
[].results Config Wise Result Collection No —
[].results[].config_id number Yes —
[].results[].status string Yes This is combined status for whole Test Case across multiple configurations (old values- 0, 1, 2, 3 ,4 and new values- unexecuted, passed, failed, skipped, blocked)
[].config_assignees Config Wise Assignee Collection No —
[].config_assignees[].config_id number Yes —
[].config_assignees[].assigned_to number No Id of the assigned user
[].last_run string No Last run
[].assigned_to User Minified No —
[].assigned_to.id number Yes —
[].assigned_to.username string No —
[].assigned_to.name string Yes —
[].assigned_to.avatar Upload No —
[].assigned_to.avatar.id number Yes —
[].assigned_to.avatar.name string Yes —
[].assigned_to.avatar.hash string Yes —
[].assigned_to.avatar.ext string Yes —
[].assigned_to.avatar.mime string Yes —
[].assigned_to.avatar.size string Yes —
[].assigned_to.avatar.url string Yes —
[].assigned_to.avatar.created_by number No —
[].assigned_to.avatar.created_at string Yes —
[].assigned_to.avatar.updated_at string Yes —
[].assigned_to.is_guest number No —
[].created_at string Yes —
[].updated_at string Yes —
Illustrative response
[]
Status Meaning
401 Unauthorized
403 Forbidden
404 Not found
500 Internal server error