playwright-ctrf-json-reporter 0.0.8 → 0.0.10

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 CHANGED
@@ -6,6 +6,10 @@ A Playwright JSON test reporter to create test reports that follow the CTRF stan
6
6
 
7
7
  [Common Test Report Format](https://ctrf.io) ensures the generation of uniform JSON test reports, independent of programming languages or test framework in use.
8
8
 
9
+ ⭐ **If you find this project useful, consider giving it a GitHub star** ⭐
10
+
11
+ It means a lot to us and helps us grow this open source library.
12
+
9
13
  ## Features
10
14
 
11
15
  - Generate JSON test reports that are [CTRF](https://ctrf.io) compliant
@@ -13,16 +17,6 @@ A Playwright JSON test reporter to create test reports that follow the CTRF stan
13
17
  - Straightforward integration with Playwright
14
18
  - Enhanced test insights with detailed test information, environment details, and more.
15
19
 
16
- ## What is CTRF?
17
-
18
- CTRF is a universal JSON test report schema that addresses the lack of a standardized format for JSON test reports.
19
-
20
- **Consistency Across Tools:** Different testing tools and frameworks often produce reports in varied formats. CTRF ensures a uniform structure, making it easier to understand and compare reports, regardless of the testing tool used.
21
-
22
- **Language and Framework Agnostic:** It provides a universal reporting schema that works seamlessly with any programming language and testing framework.
23
-
24
- **Facilitates Better Analysis:** With a standardized format, programatically analyzing test outcomes across multiple platforms becomes more straightforward.
25
-
26
20
  ```json
27
21
  {
28
22
  "results": {
@@ -55,6 +49,16 @@ CTRF is a universal JSON test report schema that addresses the lack of a standar
55
49
  }
56
50
  ```
57
51
 
52
+ ## What is CTRF?
53
+
54
+ CTRF is a universal JSON test report schema that addresses the lack of a standardized format for JSON test reports.
55
+
56
+ **Consistency Across Tools:** Different testing tools and frameworks often produce reports in varied formats. CTRF ensures a uniform structure, making it easier to understand and compare reports, regardless of the testing tool used.
57
+
58
+ **Language and Framework Agnostic:** It provides a universal reporting schema that works seamlessly with any programming language and testing framework.
59
+
60
+ **Facilitates Better Analysis:** With a standardized format, programatically analyzing test outcomes across multiple platforms becomes more straightforward.
61
+
58
62
  ## Installation
59
63
 
60
64
  ```bash
@@ -121,9 +125,8 @@ The test object in the report includes the following [CTRF properties](https://c
121
125
  | `tags` | Array of Strings | Optional | The tags retrieved from the test name |
122
126
  | `type` | String | Optional | The type of test (e.g., `api`, `e2e`). |
123
127
  | `filepath` | String | Optional | The file path where the test is located in the project. |
124
- | `retry` | Number | Optional | The number of retries attempted for the test. |
125
- | `flake` | Boolean | Optional | Indicates whether the test result is flaky. |
126
- | `attempts` | Array of Test | Optional | Previous attempts of the test during this run. |
128
+ | `retries` | Number | Optional | The number of retries attempted for the test. |
129
+ | `flaky` | Boolean | Optional | Indicates whether the test result is flaky. |
127
130
  | `browser` | String | Optional | The browser used for the test. |
128
131
  | `screenshot` | String | Optional | A base64 encoded screenshot taken during the test. |
129
132
 
@@ -114,7 +114,6 @@ class GenerateCtrfReport {
114
114
  ((_c = this.extractMetadata(testResult)) === null || _c === void 0 ? void 0 : _c.version) !== undefined)
115
115
  test.browser = `${(_d = this.extractMetadata(testResult)) === null || _d === void 0 ? void 0 : _d.name} ${(_e = this.extractMetadata(testResult)) === null || _e === void 0 ? void 0 : _e.version}`;
116
116
  }
117
- console.log(`${JSON.stringify(test)}`);
118
117
  ctrfReport.results.tests.push(test);
119
118
  }
120
119
  updateSummaryFromTestResult(testResult, ctrfReport) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "playwright-ctrf-json-reporter",
3
- "version": "0.0.8",
4
- "description": "",
3
+ "version": "0.0.10",
4
+ "description": "A Playwright JSON test reporter to create test results reports",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "build": "tsc",
@@ -15,8 +15,8 @@
15
15
  "dist/",
16
16
  "README.md"
17
17
  ],
18
- "author": "",
19
- "license": "ISC",
18
+ "author": "Matthew Thomas",
19
+ "license": "MIT",
20
20
  "devDependencies": {
21
21
  "@playwright/test": "^1.39.0",
22
22
  "@types/jest": "^29.5.6",