flakewatch-playwright 0.1.0 → 0.1.1
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/README.md +54 -0
- package/package.json +12 -4
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# flakewatch-playwright
|
|
2
|
+
|
|
3
|
+
Playwright reporter plugin for [Flakewatch](https://github.com/jlawrence6809/flakewatch) -- automatically analyzes test failures when your suite finishes.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install flakewatch-playwright
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
Add it to your Playwright config:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
// playwright.config.ts
|
|
17
|
+
export default defineConfig({
|
|
18
|
+
reporter: [
|
|
19
|
+
['html'],
|
|
20
|
+
['flakewatch-playwright'],
|
|
21
|
+
],
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Set your API key:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
That's it. When tests fail, the reporter will analyze them and write a report to `./flakewatch-reports/`.
|
|
32
|
+
|
|
33
|
+
## Options
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
reporter: [
|
|
37
|
+
['flakewatch-playwright', {
|
|
38
|
+
configPath: './flakewatch.config.ts', // Custom config file
|
|
39
|
+
config: { // Inline config overrides
|
|
40
|
+
llm: { model: 'claude-sonnet-4-20250514' },
|
|
41
|
+
output: { format: 'json' },
|
|
42
|
+
},
|
|
43
|
+
quiet: false, // Suppress console output
|
|
44
|
+
}],
|
|
45
|
+
],
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## How it works
|
|
49
|
+
|
|
50
|
+
The reporter hooks into Playwright's `onTestEnd` to capture failures (error messages, stack traces, screenshots, traces), then runs the Flakewatch triage pipeline after all tests complete.
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flakewatch-playwright",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Playwright reporter plugin that captures test failures and triages them with AI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,12 +28,20 @@
|
|
|
28
28
|
"vitest": "^3.0.0",
|
|
29
29
|
"@types/node": "^22.0.0"
|
|
30
30
|
},
|
|
31
|
-
"files": [
|
|
31
|
+
"files": [
|
|
32
|
+
"dist"
|
|
33
|
+
],
|
|
32
34
|
"license": "MIT",
|
|
33
35
|
"repository": {
|
|
34
36
|
"type": "git",
|
|
35
|
-
"url": "https://github.com/jlawrence6809/
|
|
37
|
+
"url": "https://github.com/jlawrence6809/flakewatch",
|
|
36
38
|
"directory": "packages/playwright"
|
|
37
39
|
},
|
|
38
|
-
"keywords": [
|
|
40
|
+
"keywords": [
|
|
41
|
+
"playwright",
|
|
42
|
+
"reporter",
|
|
43
|
+
"testing",
|
|
44
|
+
"ai",
|
|
45
|
+
"flaky-tests"
|
|
46
|
+
]
|
|
39
47
|
}
|