Snapvisor Docs

Get a test and its flakiness metrics

Get a test with its flakiness metrics over a period: how many builds ran it, how many times it changed, and how stable and consistent those changes were. The metrics also come bucketed over time, so you can tell a test that has always been flaky from one that started recently. Pair it with `listTestChanges` to see what actually keeps changing. Use it when asked whether a test is flaky, or since when.

GET
/projects/{owner}/{project}/tests/{testId}

Get a test with its flakiness metrics over a period: how many builds ran it, how many times it changed, and how stable and consistent those changes were. The metrics also come bucketed over time, so you can tell a test that has always been flaky from one that started recently. Pair it with listTestChanges to see what actually keeps changing. Use it when asked whether a test is flaky, or since when.

Authorization

AuthorizationBearer <token>

Authenticate as a project with a project token.

Send it as a bearer token in the Authorization header:

Authorization: Bearer <project-token>

You can find your project token in your Snapvisor project settings. Project tokens are used by CI and the SDK to create builds and deployments.

In: header

Path Parameters

owner*string
Length1 <= length
project*string
Length1 <= length
testId*string

The test identifier, as returned in a diff's test.id

Query Parameters

metricsPeriod?string

Period over which the test flakiness metrics are computed.

Default"LAST_7_DAYS"

Value in

  • "LAST_24_HOURS"
  • "LAST_3_DAYS"
  • "LAST_7_DAYS"
  • "LAST_30_DAYS"
  • "LAST_90_DAYS"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/projects/string/string/tests/string"
{  "id": "string",  "name": "string",  "buildName": "string",  "metrics": {    "total": 0,    "changes": 0,    "uniqueChanges": 0,    "stability": 0,    "consistency": 0,    "flakiness": 0  },  "status": "ongoing",  "createdAt": "2019-08-24T14:15:22Z",  "url": "http://example.com",  "series": [    {      "date": "2019-08-24T14:15:22Z",      "total": 0,      "changes": 0,      "uniqueChanges": 0    }  ],  "firstSeenChange": {    "date": "2019-08-24T14:15:22Z",    "url": "http://example.com",    "buildNumber": 1,    "buildUrl": "http://example.com"  },  "lastSeenChange": {    "date": "2019-08-24T14:15:22Z",    "url": "http://example.com",    "buildNumber": 1,    "buildUrl": "http://example.com"  }}