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.
Prerequisites
Prerequisites
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 loginif needed) - A
checkly.config.tsorcheckly.config.jsconfiguration file
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:Examples:
Terminal
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:Examples:
Terminal
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 Examples:
--tags flags can be passed, in which case checks will be run if they match any of the --tags filters.Usage:Terminal
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: Examples:
list|dot|ci|github|jsonUsage:Terminal
Terminal
boolean
number
How many times to retry a failing test run. Default: 0, max: 3Usage:Examples:
Terminal
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: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.
Terminal
Examples
Dry run all your project checks and monitors:Terminal
product and api in the file name:
Terminal
Terminal
Terminal
process.env:
Terminal
Related Commands
checkly pw-test- Run Playwright tests in the Checkly cloudcheckly trigger- Run deployed checks on-demandcheckly deploy- Deploy your application