Test list


List Multistep tests

Get a list of the multistep tests as well as the latest metrics.

GET /{website-id}/multistep

The result looks like this:

200 OK
{
"result": {
"list": [
{
"id": "27ebx6g5v2",
"alias": "Add to shopping cart",
"created": "2023-05-15T12:50:44.454Z",
"steps": [
{
"type": "navigate",
"target": "https://pagevitals.com/",
"waitUntil": "load"
},
{
"type": "click",
"target": "#menu > a:nth-child(1)",
"waitForNavigation": "on",
"waitUntil": "load"
},
...
],
"device": "desktop",
"inp": 237,
"tbt": 0,
"cls": 0.01,
"duration": 49207,
"success_rates": [
{
"date": "2023-06-10",
"rate": 100
},
{
"date": "2024-06-11",
"rate": 100
},
...
],
"state": "up",
"success_rate": 100
},
...
]
}
}

Each multistep test has these properties:

PropertyData typeDescription
idstringThe internal ID of the multistep test
aliasstingThe displayed name of the multistep test in the admin UI
createddatetimeThe date and time of when the test was created
devicestringEither desktop or mobile
stepsarrayAn array of the steps in the test. See below
inpintegerThe average of the Interaction To Next Paint metric measured in the latest 14 days (ms)
tbtintegerThe average Total Blocking Time measured across all steps in the test, during the latest 14 days (ms)
clsfloatThe average Cumulative Layout Shift measured in the latest 14 days (unitless)
durationintegerThe average duration of the test runs the past 14 days (ms)
success_ratesarrayThe daily average success rates the past 14 days. See below.
statestringEither up, down, flaky or off. Measured the past 14 days
success_rateintegerThe average success rate of the last 14 days (percentage)

The properties of each item in the steps array are shown here:

PropertyData typeDescription
typestringThe step type
targetstringThe target selector of the step type. See how to find the CSS selector here (ms)
waitForNavigationboolWhether of not the step waits for the browser to navigate to another page
waitUntilstringIf waitForNavigation is true, define what exactly to wait for - load, domcontentloaded, networkidle0 or networkidle2, see Puppeteer docs

The properties of each item in the success_rates array are shown here:

PropertyData typeDescription
datedateThe day to show the success rate for
rateintegerThe success rate of the day (percentage)

Create new multistep test

Adds a new multistep test to the website. admin

POST /{website-id}/multistep
{
  "alias": "New multistep test",
  "device": "desktop"
}

Returns the same object, but with the id added:

201 Created
{
"id": "x7wcqghdlo",
"alias": "New multistep test",
"device": "desktop"
}

Run all multistep tests

POST /{website-id}/multistep/run-all

This will trigger a new test run of each of the multistep tests and return this result:

200 OK
{
"message": "Multistep test runs started"
}