@checkly/playwright-reporter 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,19 @@ All notable changes to `@checkly/playwright-reporter` will be documented in this
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## 1.6.0
8
+
9
+ ### Added
10
+
11
+ - **Test source code** - The source code of each executed test and its dependency files (helpers, page objects, utilities) are now included in the report. View the exact test body alongside results in the Checkly UI.
12
+ - **System metrics** - CPU and memory usage are sampled throughout the test run, helping diagnose resource-constrained failures.
13
+ - **Active duration** - Reports now distinguish actual test execution time from total wall-clock time, so idle gaps from worker scheduling don't inflate your numbers.
14
+ - **Prefix-based secret scrubbing** - Environment variables starting with `CHECKLY_SECRET_` are now automatically scrubbed from reports, traces, and logs. Customize the prefix or disable it via the `scrubbing.prefix` option.
15
+
16
+ ### Changed
17
+
18
+ - **Scrubbing now covers logs** - Secret scrubbing now extends to reporter log entries, not just the JSON report and trace files.
19
+
7
20
  ## 1.5.0 (2026-02-18)
8
21
 
9
22
  ### Added
package/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # @checkly/playwright-reporter
2
2
 
3
- > **Technical Preview** - This reporter is currently in technical preview. Features and APIs may change.
4
-
5
3
  Official Playwright reporter for Checkly. Automatically upload test results, screenshots, videos, and traces to gain visibility into your end-to-end tests.
6
4
 
7
5
  **Fully compatible with Playwright's native JSON reporter** - use it as a drop-in replacement that adds Checkly integration.
@@ -81,27 +79,29 @@ createChecklyReporter({
81
79
  sessionName: 'My Test Suite',
82
80
  dryRun: false,
83
81
  verbose: false,
82
+ showProgress: true,
83
+ showSummaryTable: true,
84
84
  })
85
85
  ```
86
86
 
87
87
  | Option | Type | Default | Description |
88
88
  |--------|------|---------|-------------|
89
+ | `apiKey` | `string` | `CHECKLY_API_KEY` env var | Checkly API key |
90
+ | `accountId` | `string` | `CHECKLY_ACCOUNT_ID` env var | Checkly account ID |
89
91
  | `outputDir` | `string` | Playwright's `outputDir` | Directory for assets, JSON, and ZIP |
90
92
  | `sessionName` | `string \| function` | Auto-generated | Custom session name |
91
93
  | `dryRun` | `boolean` | `false` | Create ZIP without uploading |
92
94
  | `verbose` | `boolean` | `false` | Enable debug logging |
95
+ | `showProgress` | `boolean` | `true` | Show real-time test progress in the terminal |
96
+ | `printSteps` | `boolean` | `false` | Print individual test steps (requires `showProgress`) |
97
+ | `showSummaryTable` | `boolean` | `true` | Show per-project breakdown table after the run |
98
+ | `scrubbing` | `object \| false` | See [Secret Scrubbing](#secret-scrubbing) | Configure secret scrubbing for reports and traces |
99
+ | `testCommand` | `string` | Auto-detected | Override the test command shown in the Checkly UI |
93
100
 
94
101
  **Output files** (written to `outputDir`):
95
102
  - `checkly-report.json` - JSON test report
96
103
  - `checkly-report.zip` - ZIP archive with report and assets
97
104
 
98
- **Deprecated options** (will be removed in next major version):
99
- | Option | Migration |
100
- |--------|-----------|
101
- | `outputFile` | JSON now at `{outputDir}/checkly-report.json` |
102
- | `testResultsDir` | Use `outputDir` |
103
- | `outputPath` | ZIP now at `{outputDir}/checkly-report.zip` |
104
-
105
105
  ## Environment Variables
106
106
 
107
107
  | Variable | Description |
@@ -109,6 +109,12 @@ createChecklyReporter({
109
109
  | `CHECKLY_API_KEY` | Your Checkly API key |
110
110
  | `CHECKLY_ACCOUNT_ID` | Your Checkly account ID |
111
111
  | `CHECKLY_REPORTER_VERBOSE` | Set to `true` for detailed debug output |
112
+ | `CHECKLY_REPORTER_DRY_RUN` | Set to `true` to skip uploading |
113
+ | `CHECKLY_REPORTER_OUTPUT_DIR` | Override the output directory |
114
+ | `CHECKLY_REPORTER_SHOW_SUMMARY_TABLE` | Set to `false` to hide the summary table |
115
+ | `CHECKLY_TEST_COMMAND` | Override the test command shown in the Checkly UI |
116
+
117
+ Environment variables take precedence over options passed in the config.
112
118
 
113
119
  ## What Gets Uploaded
114
120
 
@@ -119,6 +125,32 @@ createChecklyReporter({
119
125
  - Playwright traces
120
126
  - Console logs and network requests (extracted from traces)
121
127
 
128
+ ## Secret Scrubbing
129
+
130
+ The reporter automatically scrubs sensitive values from JSON reports, trace files, and logs before upload.
131
+
132
+ By default, any environment variable whose name starts with `CHECKLY_SECRET_` is scrubbed. You can configure additional scrubbing strategies:
133
+
134
+ ```typescript
135
+ createChecklyReporter({
136
+ scrubbing: {
137
+ envVars: ['DB_PASSWORD', 'STRIPE_KEY'],
138
+ autoDetect: true,
139
+ prefix: 'CHECKLY_SECRET_',
140
+ replacement: '[REDACTED]',
141
+ },
142
+ })
143
+ ```
144
+
145
+ | Option | Type | Default | Description |
146
+ |--------|------|---------|-------------|
147
+ | `envVars` | `string[]` | `[]` | Environment variable names whose runtime values should be scrubbed |
148
+ | `autoDetect` | `boolean` | `false` | Scrub env vars matching common secret patterns (SECRET, KEY, TOKEN, PASSWORD, CREDENTIAL, AUTH, PRIVATE, API) |
149
+ | `prefix` | `string \| false \| null` | `'CHECKLY_SECRET_'` | Scrub all env vars starting with this prefix. Set to `false` or `''` to disable |
150
+ | `replacement` | `string` | `'*********'` | Custom replacement string for scrubbed values |
151
+
152
+ Set `scrubbing: false` to disable scrubbing entirely.
153
+
122
154
  ## Flaky Test Detection
123
155
 
124
156
  The reporter automatically detects flaky tests:
@@ -257,6 +289,8 @@ createChecklyReporter({
257
289
  createChecklyReporter() // Reads from environment
258
290
  ```
259
291
 
292
+ Use the [Secret Scrubbing](#secret-scrubbing) feature to ensure sensitive values don't leak into uploaded reports and traces.
293
+
260
294
  ## Documentation
261
295
 
262
296
  For detailed documentation, visit [checklyhq.com/docs/detect/testing/playwright-reporter](https://www.checklyhq.com/docs/detect/testing/playwright-reporter/).
package/dist/index.d.ts CHANGED
@@ -1,16 +1,66 @@
1
- import { JSONReportTestResult as JSONReportTestResult$1, JSONReportTestStep as JSONReportTestStep$1, Reporter } from '@playwright/test/reporter';
2
- export { JSONReport, JSONReportError, JSONReportSTDIOEntry, JSONReportSpec, JSONReportSuite, JSONReportTest, TestError } from '@playwright/test/reporter';
1
+ import { JSONReport as JSONReport$1, JSONReportSpec as JSONReportSpec$1, JSONReportTestResult as JSONReportTestResult$1, JSONReportTestStep as JSONReportTestStep$1, Reporter } from '@playwright/test/reporter';
2
+ export { JSONReportError, JSONReportSTDIOEntry, JSONReportSuite, JSONReportTest, TestError } from '@playwright/test/reporter';
3
3
 
4
- interface ChecklyStepData {
5
- location?: {
6
- file: string;
7
- line: number;
8
- column: number;
4
+ interface JSONReportSpec extends JSONReportSpec$1 {
5
+ _checkly?: {
6
+ sourceCode?: string;
7
+ };
8
+ }
9
+
10
+ interface ProjectUse {
11
+ trace?: unknown;
12
+ video?: unknown;
13
+ screenshot?: unknown;
14
+ viewport?: unknown;
15
+ baseURL?: unknown;
16
+ browserName?: unknown;
17
+ }
18
+ interface SystemTick {
19
+ /** Milliseconds since the start of the test run. */
20
+ time: number;
21
+ /** CPU usage as a fraction (0 to 1) averaged across all cores. */
22
+ cpuUsage: number;
23
+ /** Free system memory in bytes. */
24
+ memFree: number;
25
+ }
26
+ interface SystemInfo {
27
+ cpuModel: string;
28
+ cpuCores: number;
29
+ memTotal: number;
30
+ arch: string;
31
+ platform: string;
32
+ osRelease: string;
33
+ nodeVersion: string;
34
+ }
35
+ interface SystemMetrics {
36
+ info: SystemInfo;
37
+ ticks: SystemTick[];
38
+ }
39
+ interface JSONReport extends Omit<JSONReport$1, 'config' | 'stats'> {
40
+ config: Omit<JSONReport$1['config'], 'projects'> & {
41
+ projects: Array<JSONReport$1['config']['projects'][number] & {
42
+ use?: ProjectUse;
43
+ }>;
44
+ };
45
+ stats: JSONReport$1['stats'] & {
46
+ /** Total time during which tests were actively executing, excluding idle gaps. */
47
+ activeDuration: number;
48
+ /** System CPU and memory metrics sampled during the test run. */
49
+ systemMetrics: SystemMetrics;
50
+ };
51
+ _checkly?: {
52
+ sourceFiles?: Record<string, string>;
9
53
  };
10
- snippet?: string;
11
54
  }
12
55
  interface JSONReportTestStep extends JSONReportTestStep$1 {
13
- _checkly?: ChecklyStepData;
56
+ _checkly?: {
57
+ location?: {
58
+ file: string;
59
+ line: number;
60
+ column: number;
61
+ };
62
+ snippet?: string;
63
+ };
14
64
  steps?: JSONReportTestStep[];
15
65
  }
16
66
  interface ConsoleEntryLocation {
@@ -44,12 +94,11 @@ interface NetworkRequest {
44
94
  transferBytes: number | null;
45
95
  resourceBytes: number | null;
46
96
  }
47
- interface ChecklyData {
48
- console?: ConsoleLog[];
49
- network?: NetworkRequest[];
50
- }
51
97
  interface JSONReportTestResult extends JSONReportTestResult$1 {
52
- _checkly?: ChecklyData;
98
+ _checkly?: {
99
+ console?: ConsoleLog[];
100
+ network?: NetworkRequest[];
101
+ };
53
102
  }
54
103
 
55
104
  declare class MissingCredentialsError extends Error {
@@ -70,6 +119,11 @@ interface ScrubbingOptions {
70
119
  * Matches env vars containing: SECRET, KEY, TOKEN, PASSWORD, CREDENTIAL, AUTH, PRIVATE, API.
71
120
  */
72
121
  autoDetect?: boolean;
122
+ /**
123
+ * Scrub all env vars whose name starts with this prefix.
124
+ * Defaults to `'CHECKLY_SECRET_'`. Set to `false`, `null`, or `''` to disable.
125
+ */
126
+ prefix?: string | false | null;
73
127
  /**
74
128
  * Custom replacement string for scrubbed values.
75
129
  */
@@ -140,4 +194,4 @@ declare const _default: ChecklyReporterClass;
140
194
  */
141
195
  declare function createChecklyReporter(options?: ChecklyReporterOptions): ['@checkly/playwright-reporter', ChecklyReporterOptions];
142
196
 
143
- export { type ChecklyData, type ChecklyReporterOptions, type ConsoleLog, type JSONReportTestResult, type JSONReportTestStep, MissingCredentialsError, type NetworkRequest, type ScrubbingOptions, createChecklyReporter, _default as default };
197
+ export { type ChecklyReporterOptions, type ConsoleLog, type JSONReport, type JSONReportSpec, type JSONReportTestResult, type JSONReportTestStep, MissingCredentialsError, type NetworkRequest, type ScrubbingOptions, createChecklyReporter, _default as default };