ortoni-report 4.0.2-beta.1 → 4.0.3

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 (62) hide show
  1. package/changelog.md +27 -0
  2. package/dist/{chunk-INS3E7E6.mjs → chunk-4RZ5C7KY.mjs} +402 -296
  3. package/dist/{cli/cli.js → cli.js} +405 -190
  4. package/dist/cli.mjs +208 -0
  5. package/dist/helpers/HTMLGenerator.d.ts +89 -0
  6. package/dist/helpers/HTMLGenerator.js +163 -0
  7. package/dist/helpers/databaseManager.d.ts +35 -0
  8. package/dist/helpers/databaseManager.js +268 -0
  9. package/dist/helpers/fileManager.d.ts +8 -0
  10. package/dist/helpers/fileManager.js +60 -0
  11. package/dist/helpers/markdownConverter.d.ts +1 -0
  12. package/dist/helpers/markdownConverter.js +14 -0
  13. package/dist/helpers/resultProcessor.d.ts +10 -0
  14. package/dist/helpers/resultProcessor.js +60 -0
  15. package/dist/helpers/serverManager.d.ts +6 -0
  16. package/dist/helpers/serverManager.js +15 -0
  17. package/dist/helpers/templateLoader.d.ts +15 -0
  18. package/dist/helpers/templateLoader.js +88 -0
  19. package/dist/index.html +1 -1
  20. package/dist/mergeData.d.ts +13 -0
  21. package/dist/mergeData.js +182 -0
  22. package/dist/ortoni-report.d.mts +8 -1
  23. package/dist/ortoni-report.d.ts +8 -1
  24. package/dist/ortoni-report.js +211 -96
  25. package/dist/ortoni-report.mjs +25 -22
  26. package/dist/{ortoni-report.d.cts → types/reporterConfig.d.ts} +8 -33
  27. package/dist/types/reporterConfig.js +1 -0
  28. package/dist/types/testResults.d.ts +31 -0
  29. package/dist/types/testResults.js +1 -0
  30. package/dist/utils/attachFiles.d.ts +4 -0
  31. package/dist/utils/attachFiles.js +87 -0
  32. package/dist/utils/expressServer.d.ts +1 -0
  33. package/dist/utils/expressServer.js +61 -0
  34. package/dist/utils/groupProjects.d.ts +3 -0
  35. package/dist/utils/groupProjects.js +30 -0
  36. package/dist/utils/utils.d.ts +15 -0
  37. package/dist/utils/utils.js +84 -0
  38. package/package.json +11 -4
  39. package/readme.md +60 -75
  40. package/dist/chunk-45EJSEX2.mjs +0 -632
  41. package/dist/chunk-75EAJL2U.mjs +0 -632
  42. package/dist/chunk-A6HCKATU.mjs +0 -76
  43. package/dist/chunk-FGIYOFIC.mjs +0 -632
  44. package/dist/chunk-FHKWBHU6.mjs +0 -633
  45. package/dist/chunk-GLICR3VS.mjs +0 -637
  46. package/dist/chunk-HFO6XSKC.mjs +0 -633
  47. package/dist/chunk-HOZD6YIV.mjs +0 -634
  48. package/dist/chunk-IJO2YIFE.mjs +0 -637
  49. package/dist/chunk-JEIWNUQY.mjs +0 -632
  50. package/dist/chunk-JPLAGYR7.mjs +0 -632
  51. package/dist/chunk-NM6ULN2O.mjs +0 -632
  52. package/dist/chunk-OZS6QIJS.mjs +0 -638
  53. package/dist/chunk-P57227VN.mjs +0 -633
  54. package/dist/chunk-QMTRYN5N.js +0 -635
  55. package/dist/chunk-TI33PMMQ.mjs +0 -639
  56. package/dist/chunk-Z5NBP5TS.mjs +0 -635
  57. package/dist/cli/cli.cjs +0 -678
  58. package/dist/cli/cli.d.cts +0 -1
  59. package/dist/cli/cli.mjs +0 -103
  60. package/dist/ortoni-report.cjs +0 -2134
  61. /package/dist/{cli/cli.d.mts → cli.d.mts} +0 -0
  62. /package/dist/{cli/cli.d.ts → cli.d.ts} +0 -0
package/readme.md CHANGED
@@ -14,14 +14,17 @@ A comprehensive and visually appealing HTML report generator tailored for Playwr
14
14
 
15
15
  - **Sidebar Navigation**: Enjoy a clean and structured layout for seamless navigation.
16
16
  - **Sections**:
17
+
17
18
  - **Dashboard**: High-level overview of test analytics and trends.
18
19
  - **Tests**: Dive into individual test details including logs, screenshots, and errors.
19
20
  - **Analytics**: Track overall execution metrics, trends, and flaky/slow test insights.
20
21
  - **Glance**: See all the tests in a single Tabular view
22
+
21
23
  - **Hierarchical Grouping**: Tests are organized by filename, suite, and project for better traceability.
22
24
  - **Test History View**: Access up to 10 recent executions, categorized by suite and project with test Status, Duration.
23
25
  - **Configurable Integration**: Easy setup with Playwright using TypeScript/JavaScript, along with customizable preferences.
24
26
  - **Advanced Filtering**: Filter by Project, Tags, and Status
27
+ - **🔀 Merge Reports**: Combine multiple shard/parallel test run reports into a single **consolidated view** using CLI (`npx ortoni-report merge-report`)
25
28
 
26
29
  ### 2. **Detailed Reporting**
27
30
 
@@ -35,13 +38,13 @@ A comprehensive and visually appealing HTML report generator tailored for Playwr
35
38
  - Summary of total test runs, passed/failed counts, pass rate, and average duration.
36
39
  - **Trends Over Time**: Line chart showing test results across the last 30 runs.
37
40
  - **Top Flaky Tests**: Identify unstable tests quickly.
38
- - **Slowest Tests**: View tests with highest average durations.
41
+ - **Slowest Tests**: View tests with slowest average durations.
39
42
 
40
43
  - **Chart Visualizations**:
41
44
 
42
45
  - Charts for test summary, per-project breakdowns
43
46
  - Bar charts for project-specific comparisons.
44
- - **Line Chart for Trends**: Visualize execution status progression over time.
47
+ - **Line Chart for Trends**: Visualize execution status progression over time (only in local execution)
45
48
 
46
49
  - **Colorful UI**: Redesigned with vibrant, high-contrast visuals for improved readability and engagement.
47
50
 
@@ -58,8 +61,9 @@ A comprehensive and visually appealing HTML report generator tailored for Playwr
58
61
  - **Self-Contained Reports**: Easily share and review offline-friendly reports.
59
62
  - **Multi-Filters**: Combine filters for targeted test analysis.
60
63
  - **Meta Information**: Add custom user or environment metadata to reports.
61
- - **CLI**: Open the reporter anytime using the builin CLI
64
+ - **CLI**: Open the reporter anytime using the built-in CLI
62
65
  - **Open Markdown**: View markdown - Copy and use it in your AI prompt
66
+ - **Supports GitHub Actions** - [Refer the project for example](https://github.com/ortoniKC/pw-test)
63
67
 
64
68
  ---
65
69
 
@@ -70,20 +74,20 @@ A comprehensive and visually appealing HTML report generator tailored for Playwr
70
74
  Run the following command to install the **ortoni-report** package globally:
71
75
 
72
76
  ```bash
73
- npm install -D ortoni-report
77
+ npm install -g ortoni-report
74
78
  ```
75
79
 
76
- ### Step 2: Configure in `playwright.config.ts`
77
-
78
- Set up **Ortoni Report** in your Playwright configuration file with the following example:
80
+ ### Step 2: Configure in `playwright.config.[ts/js]`
79
81
 
80
82
  ```typescript
81
83
  import { defineConfig } from "@playwright/test";
82
84
  import { OrtoniReportConfig } from "ortoni-report";
83
85
  import * as os from "os";
84
86
 
87
+ // Everything is optional - use as per your requirement
88
+
85
89
  const reportConfig: OrtoniReportConfig = {
86
- open: process.env.CI ? "never" : "always", // default to never
90
+ open: process.env.CI ? "never" : "always",
87
91
  folderPath: "my-report",
88
92
  filename: "index.html",
89
93
  title: "Ortoni Test Report",
@@ -94,57 +98,28 @@ const reportConfig: OrtoniReportConfig = {
94
98
  base64Image: false,
95
99
  stdIO: false,
96
100
  meta: {
97
- "Test Cycle": "Aug 25, 2025",
98
- version: "3",
101
+ "Test Cycle": "Sep, 2025",
102
+ version: "4",
99
103
  description: "My automation suite",
100
- release: "0.3",
104
+ release: "0.1",
101
105
  platform: os.type(),
102
106
  },
103
107
  };
104
108
 
105
109
  export default defineConfig({
110
+ ... playwright config
106
111
  reporter: [["ortoni-report", reportConfig]],
107
- // Other Playwright configurations
112
+ ... playwright config
108
113
  });
109
114
  ```
110
115
 
111
- ### Configure in `playwright.config.js`
112
-
113
- ```javascript
114
- import { defineConfig } from "@playwright/test";
115
-
116
- const reportConfig = {
117
- open: process.env.CI ? "never" : "always", // default to never
118
- folderPath: "my-report",
119
- filename: "index.html",
120
- title: "Ortoni Test Report",
121
- showProject: false,
122
- projectName: "Your Project title",
123
- testType: "Functional",
124
- authorName: os.userInfo().username,
125
- base64Image: false,
126
- stdIO: false,
127
- meta: {
128
- "Test Cycle": "Aug 25, 2025",
129
- version: "3",
130
- description: "My automation suite",
131
- release: "0.3",
132
- platform: os.type(),
133
- },
134
- };
135
-
136
- export default defineConfig({
137
- reporter: [["ortoni-report", reportConfig]],
138
- // Other Playwright configurations
139
- });
140
- ```
116
+ ---
141
117
 
142
118
  ## Using the Ortoni Report CLI
143
119
 
144
120
  ### Command: `show-report`
145
121
 
146
- This command starts a local Express server and serves the generated Ortoni report. You can open the report in your default browser.
147
- Trace viewer and markdown support only in local server or cloud server
122
+ This command starts a local Express server and serves the generated Ortoni report.
148
123
 
149
124
  #### Options
150
125
 
@@ -154,42 +129,36 @@ Trace viewer and markdown support only in local server or cloud server
154
129
 
155
130
  #### Example Usage
156
131
 
157
- 1. **Default Usage**
132
+ ```bash
133
+ npx ortoni-report show-report
134
+ ```
158
135
 
159
- ```bash
160
- npx ortoni-report show-report
161
- ```
136
+ or
162
137
 
163
- This will:
138
+ ```bash
139
+ npx ortoni-report show-report --dir custom-folder --file my-report.html --port 3000
140
+ ```
164
141
 
165
- - Look for the report file `ortoni-report.html` in the `ortoni-report` folder.
166
- - Start the server on port `2004`.
142
+ ---
167
143
 
168
- 2. **Custom folder and file Options**
169
- ```bash
170
- npx ortoni-report show-report --dir custom-folder --file my-report.html --port 3000
171
- ```
172
- This will:
173
- - Look for the file `my-report.html` in `custom-folder`.
174
- - Start the server on port `3000`.
144
+ ### Command: `merge-report` _\[New]_
175
145
 
176
- #### Errors and Troubleshooting
146
+ This command **merges multiple Ortoni reports** (from shard executions or parallel test runs) into a single consolidated report.
177
147
 
178
- - If the specified file or folder does not exist, you will see an error like:
179
- ```
180
- Error: The file "my-report.html" does not exist in the folder "custom-folder".
181
- ```
182
- Ensure the file and folder paths are correct.
148
+ #### Options
183
149
 
184
- #### Accessing the Report
150
+ - **`-d, --dir <path>`**: Folder containing the shard files (folderPath - provided in ortoni-config). Defaults to ortoni-report.
151
+ - **`-f, --file <filename>`**: Name of the merged report file. Defaults to ortoni-report.html.
185
152
 
186
- Once the server is running, open your browser and navigate to:
153
+ #### Example Usage
187
154
 
188
- ```
189
- http://localhost:<port>
155
+ ```bash
156
+ npx ortoni-report merge-report
190
157
  ```
191
158
 
192
- Replace `<port>` with the port number you specified or the default port (`2004`). The report will automatically open in your default browser if the `always` option is enabled.
159
+ ```bash
160
+ npx ortoni-report merge-report --dir my-folder --file final-report.html
161
+ ```
193
162
 
194
163
  ---
195
164
 
@@ -197,27 +166,43 @@ Replace `<port>` with the port number you specified or the default port (`2004`)
197
166
 
198
167
  Stay up-to-date with the latest features, improvements, and bug fixes by reviewing the [Changelog](https://github.com/ortoniKC/ortoni-report/blob/main/changelog.md).
199
168
 
169
+ ---
170
+
200
171
  ## License
201
172
 
202
173
  This project is licensed under the terms of the [LICENSE](https://github.com/ortoniKC/ortoni-report/blob/main/LICENSE.md).
203
174
 
175
+ ---
176
+
177
+ ## Contributors
178
+
179
+ 1. [Prabhash Dissanayake](https://github.com/prabhash-dissanayake-yl) - [PR](https://github.com/ortoniKC/ortoni-report/pull/99)
180
+
204
181
  ## Feedback and Contributions
205
182
 
206
- I encourage you to share feedback and contribute to improving Ortoni Report! For issues, suggestions, or contributions, please visit our [GitHub repository](https://github.com/ortoniKC/ortoni-report).
183
+ I encourage you to share feedback and contribute to improving Ortoni Report!
184
+ For issues, suggestions, or contributions, please visit our [GitHub repository](https://github.com/ortoniKC/ortoni-report).
185
+
186
+ ---
207
187
 
208
188
  ## Support
209
189
 
210
190
  If you'd like to support this project, you can donate via UPI:
211
191
 
212
- ![UPI Payment](https://raw.githubusercontent.com/ortoniKC/ortoniKC/refs/heads/main/ortoni.png)
192
+ UPI id: ortoni@axl [Koushik Chatterjee]
213
193
 
214
194
  [Buy me coffee](https://buymeacoffee.com/letcode) | [Paypal](https://paypal.me/koushik1677?country.x=IN&locale.x=en_GB)
215
195
 
216
- Thank you for using **Ortoni Report**! I'm committed to providing you with a superior Playwright testing experience.
217
-
218
196
  ---
219
197
 
220
- **Developer & Designer**
221
- [Koushik Chatterjee](https://letcode.in/contact)
198
+ **With love**
199
+ Developed and designed by [Koushik Chatterjee](https://letcode.in/contact)
200
+
201
+ **Tech Stack**
202
+
203
+ 1. Report generated using Playwright custom report
204
+ 2. [UI - React and Shadcn UI](https://github.com/ortoniKC/ortoni-report-react)
205
+ 3. DB - sqlite
206
+ 4. Local host - express
222
207
 
223
208
  **LetCode with Koushik**