Spec Files

API Reference - Spec Files resource

This resource represents the spec files and their performance metrics, computed based on the recorded results.

Querying this resource will fetch all the executions recorded between date_start, date_end with all the filters applied, group the results by spec file name and calculate metrics:

  • overallExecutions - overall executions included in the aggregation.

  • avgDuration - an average value of the durations for non-failed executions, measured in seconds; set includeFailedInDuration to true to include failed executions in the calculation

  • failedExecutions - count of executions with at least 1 failed test.

  • flakyExecutions - count of executions with at least 1 flaky test.

  • timeoutExecutions - count of executions that were marked as timed out.

  • fullyReported - count of executions that were fully reported - i.e. all the known tests fully completed and reported the results

  • suiteSize - maximum number of tests across all the included executions

  • failureRate - the ratio of failedExecutions / overallExecutions

  • timeoutRate - the ratio of timeoutExecutions / overallExecutions

  • flakeRate - the ratio of flakyExecutions / overallExecutions

The results will be sorted according to the order parameter. Using this query would allow to programmatically access the data that is available in Test Suite Explorer.

This resource uses Offset Pagination as documented at Pagination

List the spec files associated to your specific organization and project

GET v1/spec-files/:projectId

Path Parameters

Query Parameters

{
    "status": "OK",
    "data": {
        "list": [
            {
                "signature": "326aafb71c1fda3085ebde3671f230f0",
                "spec": "feature.onboarding-25.spec.ts",
                "metrics": {
                    "overallExecutions": 3,
                    "avgDuration": 13184,
                    "failedExecutions": 0,
                    "flakyExecutions": 0,
                    "timeoutExecutions": 0,
                    "suiteSize": 2,
                    "failureRate": 0,
                    "timeoutRate": 0,
                    "flakeRate": 0,
                    "fullyReported": 3
                }
            }
        ],
        "total": 44, // the total number of spec files detected
        "nextPage": number | false // offset pagination hint
    }
}

Last updated

Change request #465: SCIM documentation