Add test cases to a test plan
POST
/testplantestcasesArray of test cases IDs -or- array of filter queries
Example
Section titled “Example”Use resource IDs from your own project. Keep the API token in your server or CI environment.
import { createConfiguration, TestPlanTestCasesApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new TestPlanTestCasesApi(config);
const result = await api.addTestPlanTestCases({ "testPlanTestCasePayload": { "testplan": 123 }});console.log(result);curl --request POST \ "https://api.testcollab.io/testplantestcases?token=$TESTCOLLAB_TOKEN" \ --header 'Content-Type: application/json' \ --data '{ "testplan": 123, "testcase": 123, "project": 123, "assigned_to": 123, "status": "example", "config_assignees": []}'Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
testplan |
number | Yes | — |
testcase |
number | No | — |
project |
number | No | — |
assigned_to |
number | No | — |
status |
string | No | — |
config_assignees |
Config Wise Assignee Collection | No | — |
config_assignees[].config_id |
number | Yes | — |
config_assignees[].assigned_to |
number | No | Id of the assigned user |
Response
Section titled “Response”200 — Action status details
{}Errors
Section titled “Errors”| Status | Meaning |
|---|---|
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not found |
500 |
Internal server error |