Test Metrics
GET
/projects/projectMetricsFetches the project specific metrics
Example
Section titled “Example”Use resource IDs from your own project. Keep the API token in your server or CI environment.
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);curl --request GET \ "https://api.testcollab.io/projects/projectMetrics?token=$TESTCOLLAB_TOKEN&project=123"Parameters
Section titled “Parameters”| 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 |
Response
Section titled “Response”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 |
{ "defectCount": 123, "timeTakenInSeconds": 123, "totalCasesCreated": 123, "casesPassed": { "total": 123, "passed": 123 }, "avgTimePerExec": 123, "neverAssignedCount": 123, "executionCount": 123}Errors
Section titled “Errors”| Status | Meaning |
|---|---|
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not found |
500 |
Internal server error |