Skip to content
developers
Open TestCollab

Add new test plan

POST/testplans

Adds a new test plan

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

example.ts
import { createConfiguration, TestPlansApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);
const api = new TestPlansApi(config);
const result = await api.addTestPlan({
"testPlanPayload": {
"title": "Checkout smoke tests",
"priority": 0,
"status": 0,
"testPlanFolder": 123,
"project": 123
}
});
console.log(result);
Field Type Required Description
id number No —
archived boolean No —
title string Yes —
priority number Yes Values: 0, 1, 2.
status number Yes 0 = Draft; 1 = Ready to execute; 2 = Finish; 3 = Finished (with failures); Values: 0, 1, 2, 3.
test_plan_folder number Yes —
description string No —
start_date string No —
end_date string No —
project number Yes —
release number No Release ID to associate this test plan with (optional). Omit this property entirely and the release of the linked build is filled in automatically; anything sent here stands as sent, including null for “no release”, even when the build belongs to another release ()
build number No Build ID whose software version this test plan’s results are traceable to (optional; send null to unlink) ()
custom_fields Array of Custom Field Input Payload No Array of custom fields

200 — Action status details

Field Type Required Description
id number Yes —
title string Yes —
priority number Yes Values: 0, 1, 2.
status number Yes 0 = Draft; 1 = Ready to execute; 2 = Finish; 3 = Finished (with failures); Values: 0, 1, 2, 3.
test_plan_folder number No —
start_date string No —
end_date string No —
created_at string No —
custom_fields Array of Custom Field Collection Output No Array of custom fields
is_public number No —
Illustrative response
{
"id": 123,
"title": "example",
"priority": 0,
"status": 0,
"test_plan_folder": 123,
"start_date": "example",
"end_date": "example",
"created_at": "example",
"custom_fields": []
}
Status Meaning
400 bad input parameter
401 Unauthorized
403 Forbidden
404 Not found
500 Internal server error