Add a set of tests for one or multiple sites, or custom URL(s)
Overview
This endpoint can be used to:
- trigger on-demand testing of a single or multiple websites
- create a deployment for site(s)
- add an adhoc test for a custom URL
Snapshot vs deploy
Snapshot is a set of on-demand tests of your website or custom URLs, submitted at the same time.
Deployment (or deploy) is a way to group and add extra information to your snapshots (e.g. name and description), for example, to mark a new version of your code (deployment marks will be present in your charts in SpeedCurve and are supposed to help you to track any performance changes).
There is one-to-one relationship between a site and a snapshot, and a one-to-many relationship between a deploy and a snapshot. Therefore, a deploy can have multiple snapshots each of which might be linked to a site.
Adhoc testing
You can initiate Adhoc (custom URL) testing using this endpoint by omitting sites
parameter and passing the following adhoc settings (that become required if sites
is not present):
urls
(array of objects): list of URLs you would like to testregions
(array of objects): list of regions (locations) to run adhoc tests from. Use Region ID from this list to pass asregion_id
. You can use private region ID if you have one.test_profiles
(array of objects): list of test profiles (browsers), including custom profiles. Use browser name from your settings page to pass asname
parameter, for exampleDesktop Slow
. Default test profiles
Please see examples of JSON body for adhoc testing below.
Example JSON requests
Single site testing
Start on-demand testing of individual site (with the test settings used for scheduled testing of the site)
{
"sites": [
{
"site_id": 123
}
]
}
Single site deployment
Add a deployment for a site
{
"sites": [
{
"site_id": 123
}
],
"deploy": {
"name": "Update React to v18.2.0"
}
}
Multiple sites testing
Start an on-demand testing of multiple sites. This will create a separate snapshot for each site
{
"sites": [
{
"site_id": 123
},
{
"site_id": 456
}
]
}
Adhoc testing
Start an adhoc test for one or more custom URLs, regions and test profiles. Optionally specify synthetic test script and HTTP Basic auth credentials for the URL(s).
{
"urls": [
{
"url": "https://www.speedcurve.com/about",
"script": null,
"auth":
{
"username": null,
"password": null
}
}
],
"regions": [
{
"region_id": "ap-southeast-1"
}
],
"test_profiles": [
{
"name": "Firefox"
},
{
"name": "Chrome Beta"
}
]
}
Adhoc deployment
Pass optional deploy
object to create a deployment for this round of adhoc tests. Might be useful to track your deployments if you use CI/CD process to trigger adhoc performance testing.
{
"urls": [
{
"url": "https://www.speedcurve.com/about",
},
{
"url": "https://www.speedcurve.com/"
}
],
"regions": [
{
"region_id": "ap-southeast-1"
}
],
"test_profiles": [
{
"name": "Desktop Slow"
},
{
"name": "Mobile Medium"
}
],
"deploy": {
"name": "v130",
"description": "Commit f0fda58630310a6dd91a7d8f0a4ceda2"
}
}