Skip to content

Commit d8c8ec4

Browse files
hwartigstefanjudis
andcommitted
Move system env var docs to playwright section.
Co-authored-by: Stefan Judis <[email protected]>
1 parent 0270c1f commit d8c8ec4

File tree

3 files changed

+42
-32
lines changed

3 files changed

+42
-32
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Playwright Check Suite Environment Variables
3+
sidebarTitle: Environment Variables
4+
description: "Customize your Playwright Check Suite runs based on the execution environment."
5+
tags: ["synthetic-monitoring", "playwright-checks", "environment-variables"]
6+
---
7+
8+
Checkly sets the following built-in environment variables on every Playwright Check Suite run. They provide information about the check execution environment, and allow you to distinguish between Checkly executions and local runs.
9+
10+
- **CHECKLY**: Set to `1` for all check runs executed by Checkly.
11+
- **CHECKLY_RUN_SOURCE**: Indicates the manual or scheduled check run trigger. Use this variable to skip parts of your test suite in certain scenarios or adjust the check run configuration. Possible values include:
12+
- `CLI_DEPLOY`: Checks deployed using `npx checkly deploy` get their first run scheduled with this type.
13+
- `DEPLOYMENT`: The check was triggered as part of a [CI/CD deployment](/integrations/ci-cd/github/deployments).
14+
- `EDITOR`: The check was triggered from the editor page of a browser, multi step or API check.
15+
- `GROUP_RUN_ALL`: The check was triggered as part of a group edit by a user clicking the "Run all checks" button.
16+
- `SCHEDULE_NOW`: The check was triggered manually by a user clicking "Schedule now" in the webapp.
17+
- `SCHEDULER`: The check was run as part of its regular schedule.
18+
- `TEST_NO_RECORD`: The check triggered from the CLI with `npx checkly test`.
19+
- `TEST_RECORD`: The check triggered from the CLI with `npx checkly test --record`.
20+
- `TRIGGER_API`: The check was triggered via the API.
21+
- `TRIGGER_NO_RECORD`: The check triggered from the CLI with `npx checkly trigger`.
22+
- `TRIGGER_RECORD`: The check triggered from the CLI with `npx checkly trigger --record`.
23+
- **CI**: Set to `1` for the following check runs:
24+
- CLI runs via `npx checkly test` or `npx checkly trigger`.
25+
- Check runs that are triggered by [deployments](/integrations/ci-cd/github/deployments).
26+
27+
The following variables are mostly for informational and debugging purposes and shouldn't be used to influence test behaviour.
28+
29+
- `ACCOUNT_ID`: The UUID of the Checkly account as found in the URL.
30+
- `CHECK_NAME`: The name of the check.
31+
- `CHECKLY_CHECK_ID`: The UUID of the check as found in the URL.
32+
- `CHECKLY_REGION`: The region in which the check was executed.
33+

docs.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@
233233
"detect/synthetic-monitoring/playwright-checks/configuration",
234234
"detect/synthetic-monitoring/playwright-checks/test-organization",
235235
"detect/synthetic-monitoring/playwright-checks/add-to-group",
236-
"detect/synthetic-monitoring/playwright-checks/custom-dependencies"
236+
"detect/synthetic-monitoring/playwright-checks/custom-dependencies",
237+
"detect/synthetic-monitoring/playwright-checks/environment-variables"
237238
]
238239
}
239240

@@ -726,7 +727,7 @@
726727
{
727728
"group": "Incidents",
728729
"pages": [
729-
"incidents/create-an-incident",
730+
"api-reference/incidents/create-an-incident",
730731
"api-reference/incidents/retrieve-an-incident",
731732
"api-reference/incidents/update-an-incident",
732733
"api-reference/incidents/delete-an-incident"
@@ -786,8 +787,8 @@
786787
"group": "Snippets",
787788
"pages": [
788789
"api-reference/snippets/list-all-snippets",
789-
"snippets/create-a-snippet",
790-
"snippets/retrieve-a-snippet",
790+
"api-reference/snippets/create-a-snippet",
791+
"api-reference/snippets/retrieve-a-snippet",
791792
"api-reference/snippets/update-a-snippet",
792793
"api-reference/snippets/delete-a-snippet"
793794
]
@@ -854,7 +855,7 @@
854855
{
855856
"group": "Environment variables",
856857
"pages": [
857-
"api-reference/apenvironment-variables/list-all-environment-variables",
858+
"api-reference/environment-variables/list-all-environment-variables",
858859
"api-reference/environment-variables/create-an-environment-variable",
859860
"api-reference/environment-variables/retrieve-an-environment-variable",
860861
"api-reference/environment-variables/update-an-environment-variable",

platform/variables.mdx

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -93,30 +93,6 @@ How variables are accessed depends on where you're accessing them from:
9393
Handlebar (double brackets) variables will be URI encoded. To avoid encoding, you can access your environment variables with triple brackets, i.e. `{{{VARIABLE_NAME}}}`.
9494
</Note>
9595

96-
## System Variables
97-
98-
Checkly provides a set of built-in system variables that you can use in your checks. These variables provide information about the check execution environment, and can be especially useful in playwright checks to distinguish between Checkly executions and local runs.
99-
100-
* **CHECKLY**: We set this to "1" for all check runs executed by Checkly.
101-
* **CHECKLY_RUN_SOURCE**: This variable indicates the source or reason why the check was run. You can use this to skip parts of your test suite in certain scenarios. Possible values include:
102-
* `CLI_DEPLOY`: When checks are deployed using `npx checkly deploy` their first run is scheduled with this type.
103-
* `DEPLOYMENT`: The check was triggered as part of a [CI/CD deployment](/integrations/ci-cd/github/deployments).
104-
* `EDITOR`: Browser, multi step and API check editor page.
105-
* `GROUP_RUN_ALL`: Group edit "Run all checks" button.
106-
* `SCHEDULE_NOW`: The check was triggered manually by a user clicking "Schedule now" in the webapp.
107-
* `SCHEDULER`: The check was executed as part of its regular schedule.
108-
* `TEST_NO_RECORD`: CLI `npx checkly test`.
109-
* `TEST_RECORD`: CLI `npx checkly test --record`.
110-
* `TRIGGER_API`: The check was triggered via the API.
111-
* `TRIGGER_NO_RECORD`: CLI Trigger `npx checkly trigger`.
112-
* `TRIGGER_RECORD`: CLI Trigger `npx checkly trigger --record`.
113-
* **CI**: We set this to "1" for the following check runs:
114-
* CLI runs via `npx checkly test` or `npx checkly trigger`.
115-
* Check runs that are triggered by [deployments](/integrations/ci-cd/github/deployments).
116-
117-
The following variables are mostly for informational and debugging purposes and shouldn't be used to influence test behaviour.
118-
119-
* `ACCOUNT_ID`: The UUID of the Checkly account as found in the URL.
120-
* `CHECK_NAME`: The name of the check.
121-
* `CHECKLY_CHECK_ID`: The UUID of the check as found in the URL.
122-
* `CHECKLY_REGION`: The region in which the check was executed.
96+
## Playwright Check Suite Variables
97+
98+
Checkly provides a set of [built-in environment variables](/detect/synthetic-monitoring/playwright-checks/environment-variables) that you can use in your [Playwright Check Suites](/detect/synthetic-monitoring/playwright-checks/overview) to distinguish between Checkly executions and local runs.

0 commit comments

Comments
 (0)