Browser Check Construct
The Browser Check construct is used to configure your monitoring settings, such as frequency, locations, and tags. Learn more about the Browser Check Constructbrowser-check.ts
Test Script Structure
Checkly uses Playwright to power Browser Checks. Playwright is a robust, open-source framework for browser automation and end-to-end web application testing. It enables you to write atomic, reliable tests and easily control interactions within a web page. Browser checks execute automated test scripts in real browsers.login.spec.ts
Environment variables
Check, group and global variables are accessible in your code using the standard Node.jsprocess.env.MY_VAR notation. For example, the code snippet below show how you can log into GitHub.
variables.spec.ts
Built-in runtime variables
Our check runtimes also expose a set of environment variables (e.g.process.env.CHECK_NAME)
to figure out what check, check type etc. you are running.
| Variable | Description | Availability |
|---|---|---|
ACCOUNT_ID | The ID of the account the check belongs to. | |
CHECK_ID | The UUID of the check being executed. | Only available after saving the check. |
CHECK_NAME | The name of the check being executed. | |
CHECK_RESULT_ID | The UUID where the result will be saved. | Only available on scheduled runs. |
CHECK_RUN_ID | The UUID of the check run execution. | Only available on scheduled runs. |
CHECK_TYPE | The type of the check, e.g. BROWSER. | |
PUBLIC_IP_V4 | The IPv4 of the check run execution. | |
PUBLIC_IP_V6 | The IPv6 of the check run execution. | |
REGION | The current region, e.g. us-west-1. | |
RUNTIME_VERSION | The version of the runtime, e.g, 2023.09. | Only in Browser, Multistep, and API setup/teardown scripts. |