Snapvisor Docs

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.

GET
/projects/{owner}/{project}/tests/{testId}/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.

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

perPage?string

Number of items per page (max 100)

page?string

Page number

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"
ignored?string

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        }      }    }  ]}