Skip to main content
Below are a number of checks showcasing how to use Multistep checks. These are similar to the templates provided in Checkly when creating a new Multistep check and should give you an idea of how to get started building various types of checks. Some of the examples require setting up authentication tokens to function.

API authentication and CRUD testing

This check will monitor the functionality of the Checkly check groups API. It will create, get, update and delete a group, cleaning up any data afterwards. You can find the Checkly API documentation here. The Checkly Public API uses API keys to authenticate requests. You can generate a key for your account here. This example uses environment variables to avoid sharing secrets in clear text. You can learn more about how to use environment variables in Checkly here.
auth.spec.ts

Cleaning Up Test Data

In this example we use beforeAll to verify that there’s no old test data that will pollute the test, and afterAll to remove any data created by the test before it ends. To learn more about these methods see the Playwright documentation. An API_KEY from https://crudapi.co.uk/ is required for this example to work.
setup-teardown.spec.ts

Verifying Binary Payloads

One way to ensure that e.g. CDN endpoints are serving images correctly is by verifying its binary. Here is an example of how to verify several images in a loop, checking each image against a unique binary.
binary.spec.ts

Dynamic Configuration