You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify what we produce after using it
Ensure Traces configuration is explained by default and with overrides with TestCommand
Address Stefan's feedback
Copy file name to clipboardExpand all lines: site/content/docs/cli/command-line-reference.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,14 +93,18 @@ Exclude tests by pattern:
93
93
npx checkly pw-test -- --grep-invert="skip|todo"
94
94
```
95
95
96
-
### Creating monitors
96
+
### Creating scheduled checks
97
+
98
+
Using `pw-test` with the `--create-check` flag will add the check with a default configuration, so that you can tweak the monitoring configuration for your check. If there's no `checkly.config.ts` file it will create it.
Using `pw-test` with the `--create-check` flag will create a `checkly.config.ts` file if it doesn't exist, and add the new check, so that you can tweak the monitoring configuration for your check.
81
+
Using `pw-test` with the `--create-check` flag will create a `checkly.config.ts` file will add the new check and create the Checkly configuration file if it doesn't exist. Afterwards, you can tweak the monitoring configuration for your check.
81
82
82
83
For example:
83
84
@@ -90,7 +91,7 @@ For example:
90
91
Creating Checkly check from Playwright test... ✅
91
92
```
92
93
93
-
Review the resulting check configuration in your `checkly.config.ts` file and make sure to tweak locations and schedule as needed.
94
+
Review the resulting check configuration in your `checkly.config.ts` file and make sure to tweak locations and schedule as needed.
Copy file name to clipboardExpand all lines: site/content/guides/using-pw-test-command.md
+40-6Lines changed: 40 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,10 @@ By default, `pw-test` uses N.Virginia (`us-east-1`) to run. Use any [global loca
49
49
50
50
### Create monitors
51
51
52
-
Add `--create-check` to convert suites of tests into scheduled Playwright check suites:
52
+
Using `pw-test` with the `--create-check` flag will create a `checkly.config.ts` file if it doesn't exist, and add the new check, so that you can tweak the monitoring configuration for your check.
53
+
54
+
Each `--create-check` call will append the check configuration to your configuration file. If you run it twice with the same configuration, it'll create the same check twice.
55
+
53
56
54
57
```bash
55
58
# Run all tests in the "chromium" project every 10 minutes
Configure which artifacts are stored in your `playwright.config.ts`:
95
98
96
99
```javascript
97
100
use: {
@@ -101,7 +104,38 @@ use: {
101
104
}
102
105
```
103
106
104
-
View all artifacts in Checkly's UI after test runs.
107
+
If you'd like different configuration for your checks, make sure to use the `--trace <mode> ` flag in the `testCommand` section of your Playwright Check Suite.
108
+
109
+
```typescript {title="checkly.config.ts"}
110
+
import { defineConfig } from'checkly'
111
+
112
+
const config =defineConfig({
113
+
logicalId: 'my-repo-name',
114
+
projectName: 'my-repo-name',
115
+
checks: {
116
+
playwrightConfigPath: './playwright.config.ts',
117
+
playwrightChecks: [
118
+
{
119
+
logicalId: 'myrepo', // tweak ID
120
+
name: 'myrepo: Chromium Playwright Tests', // tweak name
121
+
testCommand: 'npx playwright test --project=chromium --trace=on',//
122
+
locations: [
123
+
'eu-central-1', 'us-east-1'// add or change locations
124
+
],
125
+
frequency: 10, // a custom per-check frequency
126
+
},
127
+
],
128
+
},
129
+
cli: {
130
+
runLocation: 'us-east-1', // where test and pw-test will run
131
+
},
132
+
})
133
+
134
+
exportdefaultconfig
135
+
136
+
```
137
+
138
+
View all artifacts in Checkly's UI after test runs in [Test Sessions](https://app.checklyhq.com/test-sessions).
0 commit comments