Skip to main content
The checkly test command executes all checks in your project on the Checkly cloud infrastructure. This command provides a dry-run capability for testing your monitoring setup before deployment, with support for different environments and configurations.
Before using , ensure you have:
  • An initialized Checkly CLI project
  • At least one check or resource defined in your project
  • Valid Checkly account authentication (run npx checkly login if needed)
  • A checkly.config.ts or checkly.config.js configuration file
For additional setup information, see CLI overview.

Basic Usage

The basic command runs all checks in your project as a test run without deploying them to your account as monitors.
Terminal

Command Options

string
The Checkly CLI configuration file. If not passed, uses the checkly.config.ts|js file in the current directory.Usage:
Terminal
string[]
Environment variables to be passed to the test run. Can be used multiple times.Usage:
Terminal
Examples:
Terminal
string
Path to a dotenv file containing environment variables.Usage:
Terminal
string
Only run checks where the check name matches a regular expression. Default: .*Usage:
Terminal
string
The location to run the checks at.Usage:
Terminal
string
The private location to run checks at.Usage:
Terminal
Examples:
Terminal
string[]
Filter the checks to be run using a comma separated list of tags. Checks will only be run if they contain all of the specified tags. Multiple --tags flags can be passed, in which case checks will be run if they match any of the --tags filters.Usage:
Terminal
Examples:
Terminal
boolean
List all checks to be run but don’t run them.Usage:
Terminal
string
A list of custom reporters for the test output. Options: list|dot|ci|github|jsonUsage:
Terminal
Examples:
Terminal
boolean
Record test results in Checkly as a test session with full logs, traces and videos.Usage:
Terminal
number
How many times to retry a failing test run. Default: 0, max: 3Usage:
Terminal
Examples:
Terminal
string
A name to use when storing results in Checkly with --record.Usage:
Terminal
number
default:"600"
A timeout (in seconds) to wait for checks to complete.Usage:
Terminal
boolean
Update any snapshots using the actual result of this test run.Usage:
Terminal
Snapshots are essential for visual regression testing in Browser Checks.
boolean
Always show the full logs of the checks.Usage:
Terminal
boolean
Return an error if checks import dependencies that are not supported by the selected runtime. Default: trueUsage:
Terminal
Runtime-dependent checks run in a specific runtime with a pre-defined set of dependencies. If you’re using private locations and want to provide your own dependencies, disable the built-in dependency validation.
You can provide custom dependencies in Playwright Check Suites because they don’t rely on a specific runtime.

Examples

Dry run all your project checks and monitors:
Terminal
Dry run checks that have product and api in the file name:
Terminal
Record a test session in Checkly with git branch info, full logging, videos and traces:
Terminal
Dry run all checks against a specific location:
Terminal
Specify environment variables to dry run checks with a specific URL and a password. These variables are available on process.env:
Terminal