ortoni-report 2.0.3 → 2.0.5
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/changelog.md +28 -0
- package/dist/ortoni-report.d.ts +32 -46
- package/dist/ortoni-report.js +23884 -826
- package/dist/ortoni-report.mjs +23886 -834
- package/dist/style/main.css +43 -1
- package/dist/utils/expressServer.js +33 -0
- package/dist/utils/utils.js +17 -1
- package/dist/utils/webSocketHelper.js +93 -0
- package/dist/views/main.hbs +202 -250
- package/dist/views/project.hbs +132 -0
- package/dist/views/summaryCard.hbs +5 -11
- package/dist/views/testPanel.hbs +2 -3
- package/dist/views/userInfo.hbs +193 -30
- package/package.json +6 -7
- package/readme.md +112 -65
- package/dist/cli/cli.js +0 -49
package/readme.md
CHANGED
|
@@ -1,124 +1,171 @@
|
|
|
1
1
|
# Ortoni Report by Koushik (LetCode with Koushik)
|
|
2
2
|
|
|
3
|
-
Welcome to **Ortoni Report**, a
|
|
3
|
+
Welcome to **Ortoni Report**, a comprehensive and visually appealing HTML report generator tailored for Playwright tests. Designed with powerful features and customizable options, Ortoni Report simplifies the process of reviewing and managing test results, making test reporting more intuitive and accessible.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Live Demo: [Ortoni Report](https://ortoni.netlify.app/)
|
|
6
6
|
|
|
7
|
-

|
|
8
|
+
|
|
9
|
+
---
|
|
8
10
|
|
|
9
11
|
## Key Features
|
|
10
12
|
|
|
11
13
|
1. **Hierarchical Grouping**
|
|
12
|
-
- Tests are grouped
|
|
14
|
+
- Tests are structured and grouped by filename, suite, and project, providing a clear and organized view of the entire test execution.
|
|
13
15
|
|
|
14
16
|
2. **Detailed Breakdown**
|
|
15
|
-
- Each suite
|
|
17
|
+
- Each suite displays tests categorized by project, with organized test results for better navigation.
|
|
16
18
|
|
|
17
19
|
3. **Comprehensive Test Details**
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
+
- Rich details include test status (passed, failed, skipped), duration, tags, errors, logs, annotations, screenshots, videos, and trace data.
|
|
21
|
+
- Users can sort and filter tests by suite, project, or script for more focused insights.
|
|
20
22
|
|
|
21
23
|
4. **Summary Statistics**
|
|
22
|
-
- Overview
|
|
23
|
-
- Success rate calculation for test suites.
|
|
24
|
+
- Overview displays total tests, passed, failed, skipped, and flaky tests, with a success rate calculation for each suite.
|
|
24
25
|
|
|
25
|
-
5. **Chart
|
|
26
|
-
-
|
|
26
|
+
5. **Chart Visualizations**
|
|
27
|
+
- Visualize test result distributions using:
|
|
28
|
+
- **Doughnut Chart**: Illustrates overall test result status (passed, failed, skipped, flaky).
|
|
29
|
+
- **Doughnut & Bar Charts**: Breakdown of results per project (Chromium, Firefox, etc.) for easy comparison.
|
|
27
30
|
|
|
28
|
-
6. **Search and Reset**
|
|
29
|
-
- Search
|
|
30
|
-
- Reset option to clear filters and display all tests.
|
|
31
|
+
6. **Advanced Search and Reset**
|
|
32
|
+
- Search and filter tests quickly using specific keywords or criteria. Easily reset filters to display all tests again.
|
|
31
33
|
|
|
32
|
-
7. **Customization
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
34
|
+
7. **Customization & Themes**
|
|
35
|
+
- Personalize reports with project details, author name, test type, and toggle between light and dark themes.
|
|
36
|
+
- Flexibility to choose between Base64 images or file paths for screenshots.
|
|
37
|
+
- Customize report filenames and folder paths.
|
|
36
38
|
|
|
37
|
-
8. **
|
|
38
|
-
-
|
|
39
|
+
8. **Test Attachments**
|
|
40
|
+
- Screenshots
|
|
41
|
+
- Videos
|
|
42
|
+
- Trace viewer
|
|
43
|
+
- Steps
|
|
44
|
+
- Error stack trace
|
|
45
|
+
- Console logs
|
|
39
46
|
|
|
40
47
|
9. **Integration and Configuration**
|
|
41
|
-
- Easily integrate with Playwright
|
|
42
|
-
- Configure reporting preferences within
|
|
48
|
+
- Easily configure and integrate with Playwright using TypeScript/JavaScript.
|
|
49
|
+
- Configure reporting preferences within the Playwright setup for quick customization.
|
|
43
50
|
|
|
44
|
-
10. **Add Logo
|
|
45
|
-
-
|
|
51
|
+
10. **Add Your Logo**
|
|
52
|
+
- Include your branding by adding a relative or absolute path to the config for a custom logo in the report.
|
|
46
53
|
|
|
47
|
-
11. **Share
|
|
48
|
-
-
|
|
54
|
+
11. **Share Reports**
|
|
55
|
+
- Generated reports are self-contained and ready to share right away, making it easier to distribute and review.
|
|
49
56
|
|
|
50
57
|
12. **Advanced Filtering**
|
|
51
|
-
-
|
|
58
|
+
- Apply filters based on project, tags, and test status simultaneously for precise reporting. See only the relevant tests.
|
|
52
59
|
|
|
53
|
-
13. **Colorful Dashboard**
|
|
54
|
-
-
|
|
60
|
+
13. **Colorful and Intuitive Dashboard**
|
|
61
|
+
- Vibrant, intuitive color schemes enhance the dashboard’s visual appeal, improving clarity for quick test status assessment.
|
|
55
62
|
|
|
56
|
-
14. **
|
|
57
|
-
- The
|
|
63
|
+
14. **Selected Status Display**
|
|
64
|
+
- The UI now clearly displays the selected status filter, helping users keep track of the current filter criteria.
|
|
58
65
|
|
|
59
66
|
15. **Hide Skipped Tests by Default**
|
|
60
|
-
-
|
|
67
|
+
- By default, skipped tests are hidden when using the "All Tests" filter, allowing for a more focused review of relevant test cases.
|
|
68
|
+
|
|
69
|
+
---
|
|
61
70
|
|
|
62
|
-
|
|
71
|
+
## Installation & Setup
|
|
63
72
|
|
|
64
|
-
|
|
73
|
+
### Step 1: Install Ortoni Report
|
|
65
74
|
|
|
66
|
-
|
|
75
|
+
Run the following command to install the **ortoni-report** package globally:
|
|
67
76
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
77
|
+
```bash
|
|
78
|
+
npm install -g ortoni-report
|
|
79
|
+
```
|
|
71
80
|
|
|
72
|
-
###
|
|
81
|
+
### Step 2: Configure in `playwright.config.ts`
|
|
73
82
|
|
|
74
|
-
|
|
83
|
+
Set up **Ortoni Report** in your Playwright configuration file with the following example:
|
|
75
84
|
|
|
76
85
|
```typescript
|
|
77
|
-
import { defineConfig } from
|
|
86
|
+
import { defineConfig } from "@playwright/test";
|
|
78
87
|
import { OrtoniReportConfig } from "ortoni-report";
|
|
79
88
|
|
|
80
89
|
const reportConfig: OrtoniReportConfig = {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
testType: "Release",
|
|
86
|
-
title: "Ortoni Report By LetCode Koushik",
|
|
90
|
+
port: 1994,
|
|
91
|
+
open: "on-failure",
|
|
92
|
+
folderPath: "report",
|
|
93
|
+
filename: "index.html",
|
|
87
94
|
logo: "logo.png",
|
|
95
|
+
title: "Ortoni Test Report",
|
|
96
|
+
showProject: false,
|
|
97
|
+
projectName: "Ortoni-Report",
|
|
98
|
+
testType: "Release - Oct 21, 2024",
|
|
99
|
+
authorName: "Koushik (LetCode with Koushik)",
|
|
100
|
+
preferredTheme: "light",
|
|
88
101
|
base64Image: true,
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export default defineConfig({
|
|
105
|
+
reporter: [["ortoni-report", reportConfig], ["dot"]],
|
|
106
|
+
// Other Playwright configurations
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
### Configure in `playwright.config.js`
|
|
110
|
+
```javascript
|
|
111
|
+
import { defineConfig } from "@playwright/test";
|
|
112
|
+
|
|
113
|
+
const reportConfig = {
|
|
114
|
+
port: 1994,
|
|
115
|
+
open: "on-failure",
|
|
89
116
|
folderPath: "report",
|
|
90
|
-
|
|
91
|
-
|
|
117
|
+
filename: "index.html",
|
|
118
|
+
logo: "logo.png",
|
|
119
|
+
title: "Ortoni Test Report",
|
|
120
|
+
showProject: false,
|
|
121
|
+
projectName: "Ortoni-Report",
|
|
122
|
+
testType: "Release - Oct 21, 2024",
|
|
123
|
+
authorName: "Koushik (LetCode with Koushik)",
|
|
124
|
+
preferredTheme: "light",
|
|
125
|
+
base64Image: true,
|
|
126
|
+
};
|
|
92
127
|
|
|
93
128
|
export default defineConfig({
|
|
94
|
-
|
|
95
|
-
|
|
129
|
+
reporter: [["ortoni-report", reportConfig], ["dot"]],
|
|
130
|
+
// Other Playwright configurations
|
|
96
131
|
});
|
|
97
132
|
```
|
|
98
|
-
### Comprehensive Test Details
|
|
99
133
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
- **
|
|
134
|
+
## Detailed Test Information
|
|
135
|
+
|
|
136
|
+
- **Rich Test Data**: Each test includes details such as title, status, duration, tags, errors, steps, logs, video, and screenshots.
|
|
137
|
+
- **Color-Coded Status**: Green for passed, red for failed, yellow for skipped—offering a quick overview of test outcomes.
|
|
138
|
+
- **Static HTML Report**: Self-contained, standalone HTML files make sharing and storing reports convenient.
|
|
103
139
|
|
|
104
|
-
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Changelog
|
|
105
143
|
|
|
106
|
-
-
|
|
107
|
-
- **CI/CD Integration**: Improved support for CI/CD environments.
|
|
144
|
+
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).
|
|
108
145
|
|
|
109
|
-
|
|
146
|
+
---
|
|
110
147
|
|
|
111
|
-
|
|
148
|
+
## License
|
|
112
149
|
|
|
113
|
-
|
|
150
|
+
This project is licensed under the terms of the [LICENSE](https://github.com/ortoniKC/ortoni-report/blob/main/LICENSE.md).
|
|
114
151
|
|
|
115
|
-
|
|
152
|
+
---
|
|
116
153
|
|
|
117
|
-
|
|
154
|
+
## Feedback and Contributions
|
|
118
155
|
|
|
119
|
-
We
|
|
156
|
+
We 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).
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Support
|
|
161
|
+
|
|
162
|
+
If you'd like to support this project, you can donate via UPI:
|
|
163
|
+
|
|
164
|
+
**UPI**: ortoni@axl (Koushik Chatterjee)
|
|
165
|
+
|
|
166
|
+
---
|
|
120
167
|
|
|
121
|
-
Thank you for
|
|
168
|
+
Thank you for using **Ortoni Report**! We’re committed to providing you with a superior Playwright testing experience.
|
|
122
169
|
|
|
123
170
|
---
|
|
124
171
|
|
package/dist/cli/cli.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const commander_1 = require("commander");
|
|
10
|
-
const child_process_1 = require("child_process");
|
|
11
|
-
const utils_1 = require("../utils/utils");
|
|
12
|
-
const findParcelBinary = () => {
|
|
13
|
-
const localParcel = path_1.default.resolve(__dirname, '../../node_modules/.bin/parcel');
|
|
14
|
-
const projectParcel = path_1.default.resolve(process.cwd(), 'node_modules/.bin/parcel');
|
|
15
|
-
return fs_1.default.existsSync(localParcel) ? localParcel : projectParcel;
|
|
16
|
-
};
|
|
17
|
-
commander_1.program
|
|
18
|
-
.name('ortoni-report')
|
|
19
|
-
.description('Ortoni Report by LetCode with Koushik')
|
|
20
|
-
.version('1.0.0');
|
|
21
|
-
commander_1.program
|
|
22
|
-
.command('gr')
|
|
23
|
-
.description('Bundle Ortoni Report')
|
|
24
|
-
.option('-f, --filename <filename>', 'Specify the filename for the generated report', 'ortoni-report.html')
|
|
25
|
-
.action((options) => {
|
|
26
|
-
const filename = (0, utils_1.ensureHtmlExtension)(options.filename);
|
|
27
|
-
const reportPath = path_1.default.resolve(process.cwd(), filename);
|
|
28
|
-
if (!fs_1.default.existsSync(reportPath)) {
|
|
29
|
-
console.error(`${filename} not found. Please ensure the report has been generated.`);
|
|
30
|
-
process.exit(1);
|
|
31
|
-
}
|
|
32
|
-
// Resolve the path to the local parcel binary
|
|
33
|
-
const parcelPath = findParcelBinary();
|
|
34
|
-
const parcelCommand = `${parcelPath} build ${reportPath} --dist-dir ortoni-report --public-url ./`;
|
|
35
|
-
console.log('Bundling Ortoni Report...');
|
|
36
|
-
(0, child_process_1.exec)(parcelCommand, (error, stdout, stderr) => {
|
|
37
|
-
if (error) {
|
|
38
|
-
console.error(`Error: ${error.message}`);
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (stderr) {
|
|
42
|
-
console.error(`stderr: ${stderr}`);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
console.log(`stdout: ${stdout}`);
|
|
46
|
-
console.log('Report bundled successfully.');
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
commander_1.program.parse(process.argv);
|