@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.
Files changed (2) hide show
  1. package/README.md +46 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,33 +1,65 @@
1
- # @supatest/playwright-reporter (logging prototype)
1
+ # @supatest/playwright-reporter
2
2
 
3
- Minimal Playwright reporter that serializes run/test/result/attachment metadata and logs the payload to stdout. API upload is not wired yet.
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
- ## Usage
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
- projectId: process.env.SUPATEST_PROJECT_ID, // optional metadata
19
- outputFile: process.env.SUPATEST_REPORT_PATH // optional JSON output
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
- ## What it does now
26
- - Collects run metadata and every test result (including attachments and steps where available).
27
- - Prints a single JSON payload at the end of the run; optionally writes it to `outputFile`.
28
- - Generates stable IDs per run/test/result using deterministic hashes.
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
- ## Next steps (not implemented yet)
31
- - Send payload and assets to Supatest ingestion APIs.
32
- - Add signed-URL asset uploads and retry/backoff behavior.
33
- - Add richer CI/Git metadata capture.
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supatest/playwright-reporter",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Supatest Playwright reporter - stream test results to Supatest dashboard",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",