Learn more about Multistep Checks in the Multistep Checks overview.
Use Multistep Checks to run complex end-to-end workflows with Playwright that span multiple endpoints. The examples below show how to configure Multistep Checks for different testing scenarios.
Before creating Multistep Checks, ensure you have:
  • An initialized Checkly CLI project
  • Public endpoints you want to monitor
  • Runtime 2023.09 or later (Multistep Checks require newer runtimes)
For additional setup information, see CLI overview.
import { MultiStepCheck } from "checkly/constructs"
import * as path from "path"

new MultiStepCheck("multistep-check-1", {
  name: "Multistep Check #1",
  locations: ["us-east-1", "eu-west-1"],
  code: {
    entrypoint: path.join(__dirname, "multi-step.spec.ts"),
  },
})

Configuration

ParameterTypeRequiredDefaultDescription
codeobject-The Playwright test code

Multistep Check Options

code
object
required
The Playwright test code that defines your Multistep Check monitor.Usage:
// Using file reference
code: {
  entrypoint: path.join(__dirname, "user-journey.spec.ts")
}

// Using inline content
code: {
  content: `
    import { test, expect } from "@playwright/test"

    test("complete workflow", async ({ request }) => {
      // Multistep logic here
    })
  `
}
Parameters:
ParameterTypeRequiredDescription
entrypointstringPath to a .spec.js or .spec.ts file containing the Playwright test
contentstringInline JavaScript/TypeScript code as a string
You must provide either entrypoint or content, but not both.
Examples:
new MultiStepCheck("onboarding-flow", {
  name: "Complete User Onboarding",
  runtimeId: "2025.04",
  code: {
    entrypoint: path.join(__dirname, "group.spec.ts")
  }
})

// group.spec.ts
import { test, expect } from "@playwright/test"

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

const headers = {
  Authorization: `Bearer ${process.env.API_KEY}`,
  "x-checkly-account": process.env.ACCOUNT_ID,
}

test("Verify Group API", async ({ request }) => {
  /**
   * Create a group
   */
  const group = await test.step("POST /check-groups", async () => {
    const response = await request.post(`${baseUrl}/check-groups/`, {
      data: {
        locations: ["eu-west-1"],
        name: "createdViaApiCheck",
      },
      headers,
    })
    expect(response).toBeOK()

    return response.json()
  })

  /**
   * Get the newly created group
   */
  await test.step("GET /check-groups/{id}", async () => {
    const response = await request.get(`${baseUrl}/check-groups/${group.id}`, {
      headers,
    })
    expect(response).toBeOK()

    const receivedGroup = await response.json()
    expect(receivedGroup.id).toEqual(group.id)
  })

  /**
   * Update the new group
   */
  await test.step("PUT /check-groups/{id}", async () => {
    const response = await request.put(`${baseUrl}/check-groups/${group.id}`, {
      data: {
        tags: ["public-api", "added-by-check"],
      },
      headers,
    })
    expect(response).toBeOK()
  })

  /**
   * Delete the new group
   */
  await test.step("DELETE /check-group/{id}", async () => {
    const response = await request.delete(
      `${baseUrl}/check-groups/${group.id}`,
      { headers },
    )
    expect(response).toBeOK()
  })
})
Use cases: Complex API journeys, end-to-end API workflows, business process validation.

General Check Options

name
string
required
Friendly name for your multistep check that will be displayed in the Checkly dashboard and used in notifications.Usage:
new MultiStepCheck("my-multistep", {
  name: "Complete User Journey Test"
})
runtimeId
string
The ID of the runtime to use for executing the multistep check. Required to be 2023.09 or later for multistep check support.Usage:
new MultiStepCheck("my-multistep", {
  name: 'My Multistep Check',
  runtimeId: "2025.04" // Use latest runtime for best performance
  /* More options... */
})
Multistep checks require runtime 2023.09 or later. Earlier runtimes do not support multistep functionality.
frequency
Frequency
How often the multistep check should run. Use the Frequency enum to set the check interval.Usage:
import { Frequency } from 'checkly/constructs'

new MultiStepCheck("my-multistep", {
  name: "My Multistep Check",
  frequency: Frequency.EVERY_15M,
  /* More options... */
})
Available frequencies: EVERY_1M, EVERY_2M, EVERY_5M, EVERY_10M, EVERY_15M, EVERY_30M, EVERY_1H, EVERY_2H, EVERY_3H, EVERY_6H, EVERY_12H, EVERY_24H
locations
string[]
default:"[]"
Array of public location codes where the multistep check should run. Multiple locations provide geographic coverage and user experience insights.Usage:
new MultiStepCheck("global-check", {
  name: "Global Multistep Check",
  locations: ["us-east-1", "eu-west-1", "ap-southeast-1"]
  /* More options... */
})
Examples:
// Worldwide API testing
new MultiStepCheck("global-journey", {
  name: "Global API Journey",
  locations: [
    "us-east-1",      // N. Virginia
    "us-west-1",      // N. California
    "eu-west-1",      // Ireland
    "ap-southeast-1", // Singapore
    "ap-northeast-1"  // Tokyo
  ],
  /* More options... */
})
Use cases: Global API monitoring, regional API testing, geographic compliance validation.
Multistep checks are only supported on runtime 2023.09 or later. Make sure to specify a compatible runtimeId in your check configuration.