@m00nsolutions/playwright-reporter 1.0.7 → 1.0.8
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 +8 -2
- 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() {
|
|
@@ -1409,6 +1409,12 @@ export default class M00nReporter {
|
|
|
1409
1409
|
this.verbose = options.verbose || false; // Performance/timing logs
|
|
1410
1410
|
this.logFile = options.logFile || null; // Log file path
|
|
1411
1411
|
this.disabled = false;
|
|
1412
|
+
|
|
1413
|
+
if (options.enable === false) {
|
|
1414
|
+
this.log('info', 'Reporter disabled via enable: false');
|
|
1415
|
+
this.disabled = true;
|
|
1416
|
+
return;
|
|
1417
|
+
}
|
|
1412
1418
|
this.realtime = options.realtime !== false; // Default: true
|
|
1413
1419
|
this.binaryAttachments = options.binaryAttachments !== false; // Default: true (use multipart)
|
|
1414
1420
|
|
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.8",
|
|
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": {
|