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:
Property | Data type | Description |
---|---|---|
id | string | The internal ID of the multistep test |
alias | sting | The displayed name of the multistep test in the admin UI |
created | datetime | The date and time of when the test was created |
device | string | Either desktop or mobile |
steps | array | An array of the steps in the test. See below |
inp | integer | The average of the Interaction To Next Paint metric measured in the latest 14 days (ms) |
tbt | integer | The average Total Blocking Time measured across all steps in the test, during the latest 14 days (ms) |
cls | float | The average Cumulative Layout Shift measured in the latest 14 days (unitless) |
duration | integer | The average duration of the test runs the past 14 days (ms) |
success_rates | array | The daily average success rates the past 14 days. See below. |
state | string | Either up , down , flaky or off . Measured the past 14 days |
success_rate | integer | The average success rate of the last 14 days (percentage) |
The properties of each item in the steps
array are shown here:
Property | Data type | Description |
---|---|---|
type | string | The step type |
target | string | The target selector of the step type. See how to find the CSS selector here (ms) |
waitForNavigation | bool | Whether of not the step waits for the browser to navigate to another page |
waitUntil | string | If 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:
Property | Data type | Description |
---|---|---|
date | date | The day to show the success rate for |
rate | integer | The 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"
}