Skip to content
developers
Open TestCollab

Test Metrics

GET/projects/projectMetrics

Fetches the project specific metrics

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

example.ts
import { createConfiguration, ReportsApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);
const api = new ReportsApi(config);
const result = await api.getProjectMetrics({
"project": 123
});
console.log(result);
Name Location Type Required Description
project query integer Yes Project ID
start_date query string No Used when filter is applied
end_date query string No Used when filter is applied

200 — Project metrics

Field Type Required Description
defectCount integer Yes The number of defects reported from within the project
timeTakenInSeconds integer Yes Total time spent testing (in seconds)
totalCasesCreated integer Yes The number of test cases created in project
casesPassed Cases Passed Yes —
casesPassed.total integer Yes —
casesPassed.passed integer Yes —
avgTimePerExec integer Yes Time spent per execution
neverAssignedCount integer No The number of test cases that have never been assigned to anyone in a test plan
executionCount integer Yes The number of test executions created in project
Illustrative response
{
"defectCount": 123,
"timeTakenInSeconds": 123,
"totalCasesCreated": 123,
"casesPassed": {
"total": 123,
"passed": 123
},
"avgTimePerExec": 123,
"neverAssignedCount": 123,
"executionCount": 123
}
Status Meaning
401 Unauthorized
403 Forbidden
404 Not found
500 Internal server error