@supatest/playwright-reporter 0.0.1 → 0.0.2
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 +46 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,33 +1,65 @@
|
|
|
1
|
-
# @supatest/playwright-reporter
|
|
1
|
+
# @supatest/playwright-reporter
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Playwright reporter that streams test results to Supatest in real-time. Captures comprehensive test data including steps, errors, attachments, and CI/Git context.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
```bash
|
|
7
7
|
pnpm add -D @supatest/playwright-reporter
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Configuration
|
|
11
|
+
|
|
12
|
+
Add to your `playwright.config.ts`:
|
|
13
|
+
|
|
11
14
|
```ts
|
|
12
|
-
// playwright.config.ts
|
|
13
15
|
import { defineConfig } from '@playwright/test';
|
|
14
16
|
|
|
15
17
|
export default defineConfig({
|
|
16
18
|
reporter: [
|
|
17
19
|
['@supatest/playwright-reporter', {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
apiKey: process.env.SUPATEST_API_KEY,
|
|
21
|
+
projectId: process.env.SUPATEST_PROJECT_ID,
|
|
22
|
+
apiUrl: process.env.SUPATEST_API_URL, // optional, defaults to https://api.supatest.dev
|
|
23
|
+
uploadAssets: true, // optional, default true
|
|
24
|
+
maxConcurrentUploads: 5, // optional
|
|
25
|
+
retryAttempts: 3, // optional
|
|
26
|
+
timeoutMs: 30000, // optional
|
|
27
|
+
dryRun: false, // optional, for testing
|
|
20
28
|
}]
|
|
21
29
|
]
|
|
22
30
|
});
|
|
23
31
|
```
|
|
24
32
|
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
## Environment Variables
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
SUPATEST_API_KEY=sk_live_... # Required: API authentication key
|
|
37
|
+
SUPATEST_PROJECT_ID=proj_123 # Required: Project identifier
|
|
38
|
+
SUPATEST_API_URL=https://api.supatest.dev # Optional: Custom API endpoint
|
|
39
|
+
SUPATEST_DRY_RUN=true # Optional: Test mode (no actual uploads)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Features
|
|
43
|
+
|
|
44
|
+
### Test Data Collection
|
|
45
|
+
- **Test Results**: Status, duration, retry info, flaky detection
|
|
46
|
+
- **Test Steps**: Nested step hierarchy with timing and status
|
|
47
|
+
- **Errors**: Source location, stack traces, and failure details
|
|
48
|
+
- **Console Output**: stdout/stderr captured during test execution
|
|
49
|
+
- **Attachments**: Screenshots, videos, and traces metadata
|
|
50
|
+
|
|
51
|
+
### Environment & Context
|
|
52
|
+
- **OS Info**: Platform, release, architecture, CPU count, RAM
|
|
53
|
+
- **Node.js Version**: Runtime environment details
|
|
54
|
+
- **Playwright Config**: Version, workers, retry strategy, parallel mode
|
|
55
|
+
- **Browser Projects**: Browser type, viewport, locale, timezone per project
|
|
56
|
+
- **Sharding Info**: Current shard and total shards
|
|
57
|
+
- **CI Provider Detection**: GitHub Actions, GitLab, Jenkins, CircleCI, Travis, Buildkite, Azure
|
|
58
|
+
- **Git Context**: Branch, commit, message, repository, author
|
|
29
59
|
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
60
|
+
### Performance & Reliability
|
|
61
|
+
- **Non-Blocking Uploads**: Test execution continues while uploads happen in background
|
|
62
|
+
- **Concurrent Uploads**: Configurable concurrency control (default: 5 parallel)
|
|
63
|
+
- **Retry Logic**: Exponential backoff with configurable attempts
|
|
64
|
+
- **Error Handling**: Graceful degradation—reporting failures don't block tests
|
|
65
|
+
- **Signed URL Uploads**: Direct S3 uploads via signed URLs from API
|