Multistep checks allow you to monitor complex API workflows that span multiple endpoints and validate complete business processes. In this comprehensive guide, you’ll create your first multistep check to ensure your critical API workflows function correctly end-to-end.
You’ll need a series of API endpoints that work together to complete a business process. Multistep checks excel at testing workflows that require data to flow from one API call to the next.
Multistep check edit page

Name and tags

A meaningful name will not only help you and others identify your checks within Checkly, but it will help provide a better alerting experience if your checks fall into an alert state. Tags can relate your checks together. They also determine which checks are shown on your dashboards.

Playwright script

A valid Multistep check is based on a valid Playwright API test script. You can create these scripts either in the in-app editor, or write them in your IDE and deploy them using the Checkly CLI. For production, we recommend using the CLI so you can leverage best practices such as version control and code reviews before updating your checks.
Valid Playwright Test API scripts are the foundation of a valid Multistep check. If the script passes, your check passes. If the script fails, your check fails.

Structuring a Multistep check

To preserve test isolation and provide a structured report view of Multistep checks, Checkly relies on Playwright’s test.step method. Your Multistep check can have several test steps. API requests and assertions in the same test step will be presented under the same node in the reporting structure. Multistep test results To provide actionable and easy-to-read check run results, we recommend using the test.step() structure when writing the Playwright script for you Multistep check.
import { test, expect } from '@playwright/test'

const baseUrl = 'https://api.checklyhq.com/v1'

test('My test', async ({request}) => {
    await test.step('First step', async () => {
        const health = await request.get(`${baseUrl}/health`)
        await expect(health).toBeOK()
    });

    await test.step('Second step', async () => {
        const response = await request.post(<your request>)
        // Assertions for the second step
        ...
    })
})

Building scripts in the web editor

You can edit and debug Playwright scripts straight from the web editor. Use the “Run Script” button to run your script ad-hoc, without recording it as a scheduled run.
Multistep check editor
In the sidebar, you can view:
  • File dependencies
  • Your Playwright config file (if your check was created with the Checkly CLI)
  • The test report
  • OpenTelemetry traces for this run (if you’ve enabled Checkly Traces)
  • Runtimes, including the packages in your current runtime
After each test run, you can view the result tree by selecting the test report in the editor sidebar. Selecting an API request shows details about that request. You can also view errors and any failed assertions in this report.

Scheduling & locations

You can configure your checks to run from our public locations, or use a Checkly Agent to host your own private locations. If you don’t select more than one location and you’ve disabled retrying checks from the same location, we will pick a random location when retrying checks. Checkly runs your Multistep checks based on an interval you set. The shortest interval you can run is every minute and the longest is every 24 hours.

Retries & alerting

Select your preferred retry strategy for failed checks. Choose which alert channels to get notified through when your check runs into issues. If we don’t have your preferred alert method, use webhooks to configure your alert flow.

Testing

You can run your check as an E2E test locally or from your CI/CD pipeline to validate your freshly deployed application. Use the Checkly CLI, or configure integrations with Vercel and GitHub.