Skip to content
developers
Open TestCollab

Assign test plan to users

POST/testplans/assign

Assign test plan to users

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

example.ts
import { createConfiguration, TestPlansAssignmentApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);
const api = new TestPlansAssignmentApi(config);
const result = await api.assignTestPlan({
"testplan": 123,
"project": 123,
"testPlanAssignmentPayload": {
"executor": "me",
"project": 123,
"testplan": 123
}
});
console.log(result);
Name Location Type Required Description
testplan query integer Yes Test Plan ID
project query integer Yes Project ID
Field Type Required Description
executor string Yes Values: me, team.
assignment_criteria string No Values: configuration, testCase.
assignment_method string No Values: automatic, manual.
assignment object No Only allowed in case of assignment_method = manual. Children objects - testCases and configuration are nullable based on assignment_criteria’s value
assignment.user Array of number Yes User ID
assignment.testCases Test Case Ref Collection Yes This should be null in case of assignment_criteria = configuration
assignment.testCases.testCases Array of number No Array of test case IDs
assignment.testCases.selector Array of Filter Query No FilterQuery object to match test cases
assignment.configuration Array of number Yes Configuration ID, This should be null in case of assignment_criteria = testCase
project integer Yes —
testplan integer Yes —
override_existing_assignees boolean No When false (default) the assignment rules are applied only to test cases that are still unassigned, preserving assignees inherited from the test case default and assignees already picked inside the test plan. When true the rules are applied to every test case, replacing existing assignments.

200 — Assignment result

Illustrative response
{}
Status Meaning
401 Unauthorized
403 Forbidden
404 Not found
500 Internal server error