@m00nsolutions/playwright-reporter 1.0.7 → 1.0.9
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 +7 -7
- package/index.mjs +11 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @m00nsolutions/playwright-reporter
|
|
2
2
|
|
|
3
|
-
Official Playwright test reporter for [
|
|
3
|
+
Official Playwright test reporter for [M00N Report](https://m00nreport.com) - a real-time test reporting dashboard.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -58,13 +58,13 @@ export default defineConfig({
|
|
|
58
58
|
npx playwright test
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
That's it! Your test results will appear in the
|
|
61
|
+
That's it! Your test results will appear in the M00N Report dashboard in real-time.
|
|
62
62
|
|
|
63
63
|
## Configuration Options
|
|
64
64
|
|
|
65
65
|
| Option | Type | Default | Description |
|
|
66
66
|
|--------|------|---------|-------------|
|
|
67
|
-
| `serverUrl` | `string` | **required** |
|
|
67
|
+
| `serverUrl` | `string` | **required** | M00N Report ingest service URL |
|
|
68
68
|
| `apiKey` | `string` | **required** | Project API key (identifies org and project) |
|
|
69
69
|
| `launch` | `string` | `'Run {date}'` | Title for this test run |
|
|
70
70
|
| `tags` | `string[]` | `[]` | Tags to categorize the run |
|
|
@@ -83,7 +83,7 @@ M00N_TAGS=smoke,regression
|
|
|
83
83
|
|
|
84
84
|
## CI/CD Auto-Detection
|
|
85
85
|
|
|
86
|
-
The reporter **automatically detects** CI/CD environment variables from popular providers and includes them as run attributes. No configuration needed
|
|
86
|
+
The reporter **automatically detects** CI/CD environment variables from popular providers and includes them as run attributes. No configuration needed - just run your tests in CI and the dashboard will display branch, commit, build URL, and more.
|
|
87
87
|
|
|
88
88
|
### Supported Providers
|
|
89
89
|
|
|
@@ -106,11 +106,11 @@ The following attributes are automatically populated when running in a supported
|
|
|
106
106
|
| `ci_provider` | CI provider name | `GitHub Actions` | `GitLab CI` | `Jenkins` | `Bitbucket Pipelines` | `Azure DevOps` | `CircleCI` | `Travis CI` |
|
|
107
107
|
| `branch` | Git branch | `GITHUB_REF_NAME` | `CI_COMMIT_REF_NAME` | `BRANCH_NAME` | `BITBUCKET_BRANCH` | `BUILD_SOURCEBRANCH` | `CIRCLE_BRANCH` | `TRAVIS_BRANCH` |
|
|
108
108
|
| `commit` | Git commit SHA | `GITHUB_SHA` | `CI_COMMIT_SHA` | `GIT_COMMIT` | `BITBUCKET_COMMIT` | `BUILD_SOURCEVERSION` | `CIRCLE_SHA1` | `TRAVIS_COMMIT` |
|
|
109
|
-
| `pipeline` | Pipeline/workflow name | `GITHUB_WORKFLOW` | `CI_PIPELINE_NAME` | `JOB_NAME` |
|
|
109
|
+
| `pipeline` | Pipeline/workflow name | `GITHUB_WORKFLOW` | `CI_PIPELINE_NAME` | `JOB_NAME` | - | `BUILD_DEFINITIONNAME` | `CIRCLE_WORKFLOW_JOB_NAME` | - |
|
|
110
110
|
| `build_number` | Build number | `GITHUB_RUN_NUMBER` | `CI_PIPELINE_ID` | `BUILD_NUMBER` | `BITBUCKET_BUILD_NUMBER` | `BUILD_BUILDNUMBER` | `CIRCLE_BUILD_NUM` | `TRAVIS_BUILD_NUMBER` |
|
|
111
111
|
| `build_url` | Link to build | Auto-composed | `CI_PIPELINE_URL` | `BUILD_URL` | Auto-composed | Auto-composed | `CIRCLE_BUILD_URL` | `TRAVIS_BUILD_WEB_URL` |
|
|
112
|
-
| `trigger` | What triggered the build | `GITHUB_EVENT_NAME` | `CI_PIPELINE_SOURCE` |
|
|
113
|
-
| `triggered_by` | User who triggered | `GITHUB_ACTOR` | `CI_GITLAB_USER_LOGIN` |
|
|
112
|
+
| `trigger` | What triggered the build | `GITHUB_EVENT_NAME` | `CI_PIPELINE_SOURCE` | - | - | `BUILD_REASON` | - | `TRAVIS_EVENT_TYPE` |
|
|
113
|
+
| `triggered_by` | User who triggered | `GITHUB_ACTOR` | `CI_GITLAB_USER_LOGIN` | - | - | - | `CIRCLE_USERNAME` | - |
|
|
114
114
|
|
|
115
115
|
### Manual Override
|
|
116
116
|
|
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// M00n Reporter v2 - Simplified Playwright reporter for
|
|
1
|
+
// M00n Reporter v2 - Simplified Playwright reporter for M00N Report dashboard
|
|
2
2
|
//
|
|
3
3
|
// Key improvements over v1:
|
|
4
4
|
// 1. Hybrid model - real-time step streaming + atomic final persistence
|
|
@@ -473,7 +473,7 @@ function parseTags(tags) {
|
|
|
473
473
|
/**
|
|
474
474
|
* Auto-detect CI/CD environment variables from common providers.
|
|
475
475
|
* Returns a flat key-value object using attribute names that the
|
|
476
|
-
*
|
|
476
|
+
* M00N Report dashboard recognizes (branch, commit, pipeline, etc.).
|
|
477
477
|
* User-provided attributes always take precedence over auto-detected ones.
|
|
478
478
|
*/
|
|
479
479
|
function detectCIAttributes() {
|
|
@@ -1297,7 +1297,9 @@ class TestCollector {
|
|
|
1297
1297
|
return null;
|
|
1298
1298
|
}
|
|
1299
1299
|
|
|
1300
|
-
|
|
1300
|
+
// Use actual filename from path instead of generic Playwright names (e.g., "screenshot" -> "screenshot.png")
|
|
1301
|
+
// Traces already had this behavior; now all file-based attachments get real filenames
|
|
1302
|
+
name = path.basename(attachment.path);
|
|
1301
1303
|
|
|
1302
1304
|
// Large file: store path for streaming upload (no buffering!)
|
|
1303
1305
|
if (stats.size > LARGE_FILE_THRESHOLD && binaryMode) {
|
|
@@ -1409,6 +1411,12 @@ export default class M00nReporter {
|
|
|
1409
1411
|
this.verbose = options.verbose || false; // Performance/timing logs
|
|
1410
1412
|
this.logFile = options.logFile || null; // Log file path
|
|
1411
1413
|
this.disabled = false;
|
|
1414
|
+
|
|
1415
|
+
if (options.enable === false) {
|
|
1416
|
+
this.log('info', 'Reporter disabled via enable: false');
|
|
1417
|
+
this.disabled = true;
|
|
1418
|
+
return;
|
|
1419
|
+
}
|
|
1412
1420
|
this.realtime = options.realtime !== false; // Default: true
|
|
1413
1421
|
this.binaryAttachments = options.binaryAttachments !== false; // Default: true (use multipart)
|
|
1414
1422
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m00nsolutions/playwright-reporter",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Playwright test reporter for
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"description": "Playwright test reporter for M00N Report dashboard - real-time test result streaming with step tracking, attachments, and retry support",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|