List a test's changes
List the distinct changes a test produced over a period, the ones that came back most often first. Each change is one exact visual difference, with how many times it reappeared, whether it is ignored, and the diff of its latest occurrence — so you can look at what moved. A change that keeps reappearing while nothing in the UI changed is a flaky one: fix what makes it unstable, or silence it with `ignoreChange`. Use it to see what keeps changing in a flaky test.
List the distinct changes a test produced over a period, the ones that came back most often first. Each change is one exact visual difference, with how many times it reappeared, whether it is ignored, and the diff of its latest occurrence — so you can look at what moved. A change that keeps reappearing while nothing in the UI changed is a flaky one: fix what makes it unstable, or silence it with ignoreChange. Use it to see what keeps changing in a flaky test.
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
1 <= length1 <= lengthThe test identifier, as returned in a diff's test.id
Query Parameters
Number of items per page (max 100)
Page number
Period over which the test flakiness metrics are computed.
"LAST_7_DAYS"Value in
- "LAST_24_HOURS"
- "LAST_3_DAYS"
- "LAST_7_DAYS"
- "LAST_30_DAYS"
- "LAST_90_DAYS"
Restrict the changes to the ones currently ignored (true) or to the ones still under review (false). Omit it to get both.
Value in
- "true"
- "false"
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/projects/string/string/tests/string/changes"{ "pageInfo": { "total": 0, "page": 0, "perPage": 0 }, "results": [ { "id": "string", "ignored": true, "occurrences": 0, "firstSeen": { "date": "2019-08-24T14:15:22Z", "url": "http://example.com", "buildNumber": 1, "buildUrl": "http://example.com" }, "lastSeen": { "date": "2019-08-24T14:15:22Z", "url": "http://example.com", "buildNumber": 1, "buildUrl": "http://example.com" }, "diff": { "id": "string", "name": "string", "status": "pending", "score": 0, "group": "string", "parentName": "string", "url": "http://example.com", "base": { "id": "string", "name": "string", "metadata": { "$schema": "https://api.snapvisor.io/v2/screenshot-metadata.json", "url": "string", "previewUrl": "string", "viewport": { "width": 0, "height": 0 }, "colorScheme": "light", "mediaType": "screen", "test": { "id": "string", "title": "string", "titlePath": [ "string" ], "retries": 0, "retry": 0, "repeat": 0, "location": { "file": "string", "line": 0, "column": 0 }, "annotations": [ { "type": "string", "description": "string", "location": { "file": "string", "line": 0, "column": 0 } } ], "tags": [ "string" ] }, "browser": { "name": "string", "version": "string" }, "automationLibrary": { "name": "string", "version": "string" }, "sdk": { "name": "string", "version": "string" }, "story": { "id": "string", "tags": [ "string" ], "mode": "string", "play": true }, "tags": [ "string" ] }, "width": 0, "height": 0, "url": "http://example.com", "contentType": "string" }, "head": { "id": "string", "name": "string", "metadata": { "$schema": "https://api.snapvisor.io/v2/screenshot-metadata.json", "url": "string", "previewUrl": "string", "viewport": { "width": 0, "height": 0 }, "colorScheme": "light", "mediaType": "screen", "test": { "id": "string", "title": "string", "titlePath": [ "string" ], "retries": 0, "retry": 0, "repeat": 0, "location": { "file": "string", "line": 0, "column": 0 }, "annotations": [ { "type": "string", "description": "string", "location": { "file": "string", "line": 0, "column": 0 } } ], "tags": [ "string" ] }, "browser": { "name": "string", "version": "string" }, "automationLibrary": { "name": "string", "version": "string" }, "sdk": { "name": "string", "version": "string" }, "story": { "id": "string", "tags": [ "string" ], "mode": "string", "play": true }, "tags": [ "string" ] }, "width": 0, "height": 0, "url": "http://example.com", "contentType": "string" }, "test": { "id": "string", "name": "string", "buildName": "string", "metrics": { "total": 0, "changes": 0, "uniqueChanges": 0, "stability": 0, "consistency": 0, "flakiness": 0 } }, "change": { "id": "string", "ignored": true, "occurrences": 0 } } } ]}Get a test and its flakiness metrics GET
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 an account GET
Retrieve an account with its plan and current-period usage. Use it to watch screenshot consumption against the plan before it runs over.