ortoni-report 2.0.4 → 2.0.6

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.
@@ -30,11 +30,11 @@
30
30
  </p>
31
31
  </div>
32
32
  </div>
33
+ {{#if (or authorName testType)}}
33
34
  <div class="column is-half">
34
35
  <div class="content">
35
- <div class="content">
36
- {{#if authorName}}
37
- <div class="field"></div>
36
+ {{#if authorName}}
37
+ <div class="field">
38
38
  <label class="label" for="Tester">Tester</label>
39
39
  <p class="is-flex is-align-items-center">
40
40
  <span class="icon has-text-info mr-2">
@@ -44,9 +44,10 @@
44
44
  </p>
45
45
  </div>
46
46
  {{/if}}
47
+
47
48
  {{#if testType}}
48
49
  <div class="field">
49
- <label class="label" for="test Type">Test Type</label>
50
+ <label class="label" for="testType">Test Type</label>
50
51
  <p class="is-flex is-align-items-center">
51
52
  <span class="icon has-text-primary mr-2">
52
53
  <i class="fas fa-code-branch"></i>
@@ -57,6 +58,7 @@
57
58
  {{/if}}
58
59
  </div>
59
60
  </div>
61
+ {{/if}}
60
62
  </div>
61
63
  <div class="columns">
62
64
  <div class="column is-half">
@@ -91,9 +93,8 @@
91
93
  labels: ['Passed', 'Failed', 'Skipped', 'Flaky'],
92
94
  datasets: [{
93
95
  data: [{{ passCount }}, {{ failCount }}, {{ skipCount }}, {{ flakyCount }}],
94
- backgroundColor: ['#28a745', '#ff6685', '#66d1ff', '#ffb70f']
95
- }]
96
- },
96
+ backgroundColor: ['#28a745', '#ff6685', '#66d1ff', '#ffb70f']}]
97
+ },
97
98
  options: {
98
99
  responsive: true,
99
100
  maintainAspectRatio: false,
@@ -109,7 +110,7 @@
109
110
  },
110
111
  tooltip: {
111
112
  callbacks: {
112
- label: function(tooltipItem) {
113
+ label: function (tooltipItem) {
113
114
  const total = tooltipItem.dataset.data.reduce((a, b) => a + b, 0);
114
115
  const value = tooltipItem.raw;
115
116
  const percentage = ((value / total) * 100).toFixed(2);
@@ -187,7 +188,7 @@
187
188
  {
188
189
  label: 'Flaky',
189
190
  data: retryTests,
190
- backgroundColor: '#ffb70f',
191
+ backgroundColor: '#ffb70f',
191
192
  }
192
193
  ]
193
194
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ortoni-report",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "Playwright Report By LetCode with Koushik",
5
5
  "scripts": {
6
6
  "tsc": "tsc",
@@ -32,9 +32,11 @@
32
32
  "homepage": "https://github.com/ortoniKC/ortoni-report#readme",
33
33
  "devDependencies": {
34
34
  "@playwright/test": "^1.44.1",
35
+ "@types/express": "^5.0.0",
35
36
  "@types/node": "^22.0.2",
36
37
  "@types/ws": "^8.5.12",
37
38
  "ansi-to-html": "^0.7.2",
39
+ "express": "^4.21.1",
38
40
  "handlebars": "^4.7.8",
39
41
  "tsup": "^6.5.0",
40
42
  "typescript": "^4.9.4",
package/readme.md CHANGED
@@ -1,131 +1,190 @@
1
1
  # Ortoni Report by Koushik (LetCode with Koushik)
2
2
 
3
- Welcome to **Ortoni Report**, a robust HTML report generator tailored for Playwright tests. Ortoni Report introduces powerful features to enhance test reporting, making it easier to visualize and manage test results.
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
- Experience the live report: [Ortoni Report](https://ortoni.netlify.app/)
5
+ ### Live Demo: [Ortoni Report](https://ortoni.netlify.app/)
6
6
 
7
- ![Ortoni Report Preview](https://raw.githubusercontent.com/ortoniKC/ortoni-report/refs/heads/V2.0.4/Ortoni-report.png)
7
+ ![Ortoni Report Preview](https://raw.githubusercontent.com/ortoniKC/ortoni-report/refs/heads/V2.0.5/assets/images/Ortoni-report.png)
8
+
9
+ ---
8
10
 
9
11
  ## Key Features
10
12
 
11
13
  1. **Hierarchical Grouping**
12
- - Tests are grouped hierarchically by file name, suite, and project, offering a structured view of test execution.
14
+
15
+ - Tests are structured and grouped by filename, suite, and project, providing a clear and organized view of the entire test execution.
13
16
 
14
17
  2. **Detailed Breakdown**
15
- - Each suite includes categorized tests under respective projects, providing clear organization.
18
+
19
+ - Each suite displays tests categorized by project, with organized test results for better navigation.
16
20
 
17
21
  3. **Comprehensive Test Details**
18
- - Display test status (passed, failed, skipped), duration, tags, errors, logs, and screenshots.
19
- - Sort and filter tests by suite, project, and script for detailed insights.
22
+
23
+ - Rich details include test status (passed, failed, skipped), duration, tags, errors, logs, annotations, screenshots, videos, and trace data.
24
+ - Users can sort and filter tests by suite, project, or script for more focused insights.
20
25
 
21
26
  4. **Summary Statistics**
22
- - Overview of total tests, passed, failed, skipped, and flaky tests.
23
- - Success rate calculation for test suites.
24
27
 
25
- 5. **Chart Visualization**
26
- - Doughnut chart representation for visualizing test result distribution (passed, failed, skipped, flaky).
28
+ - Overview displays total tests, passed, failed, skipped, and flaky tests, with a success rate calculation for each suite.
29
+
30
+ 5. **Chart Visualizations**
27
31
 
28
- 6. **Search and Reset**
29
- - Search functionality to filter tests based on user input.
30
- - Reset option to clear filters and display all tests.
32
+ - Visualize test result distributions using:
33
+ - **Doughnut Chart**: Illustrates overall test result status (passed, failed, skipped, flaky).
34
+ - **Doughnut & Bar Charts**: Breakdown of results per project (Chromium, Firefox, etc.) for easy comparison.
31
35
 
32
- 7. **Customization and Themes**
33
- - Customize project details, author name, test types, and toggle between dark/light themes.
34
- - Option to choose between Base64 images or file paths for screenshots.
35
- - Users can set the report file name.
36
+ 6. **Advanced Search and Reset**
36
37
 
37
- 8. **Responsive Design**
38
- - Optimized layout that adapts seamlessly to different screen sizes for accessibility.
38
+ - Search and filter tests quickly using specific keywords or criteria. Easily reset filters to display all tests again.
39
+
40
+ 7. **Customization & Themes**
41
+
42
+ - Personalize reports with project details, author name, test type, and toggle between light and dark themes.
43
+ - Flexibility to choose between Base64 images or file paths for screenshots.
44
+ - Customize report filenames and folder paths.
45
+
46
+ 8. **Test Attachments**
47
+
48
+ - Screenshots
49
+ - Videos
50
+ - Trace viewer
51
+ - Steps
52
+ - Error stack trace
53
+ - Console logs
39
54
 
40
55
  9. **Integration and Configuration**
41
- - Easily integrate with Playwright configurations using TypeScript/JavaScript.
42
- - Configure reporting preferences within your Playwright setup.
43
56
 
44
- 10. **Add Logo to the Report**
45
- - Add a relative or absolute path of the image to the config.
57
+ - Easily configure and integrate with Playwright using TypeScript/JavaScript.
58
+ - Configure reporting preferences within the Playwright setup for quick customization.
59
+
60
+ 10. **Add Your Logo**
61
+
62
+ - Include your branding by adding a relative or absolute path to the config for a custom logo in the report.
46
63
 
47
- 11. **Share Report**
48
- - Once report is generated it is ready to share
64
+ 11. **Share Reports**
65
+
66
+ - Generated reports are self-contained and ready to share right away, making it easier to distribute and review.
49
67
 
50
68
  12. **Advanced Filtering**
51
- - Filter tests by project, tags, and status simultaneously, with the ability to display only those tests matching the selected criteria.
52
69
 
53
- 13. **Colorful Dashboard**
54
- - Enhanced the visual appeal of the dashboard with vibrant and intuitive colors.
70
+ - Apply filters based on project, tags, and test status simultaneously for precise reporting. See only the relevant tests.
71
+
72
+ 13. **Colorful and Intuitive Dashboard**
73
+
74
+ - Vibrant, intuitive color schemes enhance the dashboard’s visual appeal, improving clarity for quick test status assessment.
55
75
 
56
- 14. **Display Selected Status on UI**
57
- - The selected status filter is now visible on the UI, making it easier to track the current filter settings.
76
+ 14. **Selected Status Display**
77
+
78
+ - The UI now clearly displays the selected status filter, helping users keep track of the current filter criteria.
58
79
 
59
80
  15. **Hide Skipped Tests by Default**
60
- - Skipped tests are now hidden by default when using the "All Tests" filter, providing a cleaner and more focused view of relevant tests.
81
+ - By default, skipped tests are hidden when using the "All Tests" filter, allowing for a more focused review of relevant test cases.
61
82
 
62
- ### How to Use Ortoni Report
83
+ ---
63
84
 
64
- #### Installation
85
+ ## Installation & Setup
65
86
 
66
- 1. **Install the ortoni-report package**:
87
+ ### Step 1: Install Ortoni Report
67
88
 
68
- ```sh
69
- npm install -g ortoni-report
70
- ```
89
+ Run the following command to install the **ortoni-report** package globally:
71
90
 
72
- ### Configurable Report Generation
91
+ ```bash
92
+ npm install -g ortoni-report
93
+ ```
73
94
 
74
- Configure OrtoniReport in your `playwright.config.ts`:
95
+ ### Step 2: Configure in `playwright.config.ts`
96
+
97
+ Set up **Ortoni Report** in your Playwright configuration file with the following example:
75
98
 
76
99
  ```typescript
77
- import { defineConfig } from '@playwright/test';
100
+ import { defineConfig } from "@playwright/test";
78
101
  import { OrtoniReportConfig } from "ortoni-report";
79
102
 
80
103
  const reportConfig: OrtoniReportConfig = {
81
- preferredTheme: "light",
82
- filename: "index",
83
- authorName: "Koushik (LetCode with Koushik)",
84
- projectName: "Ortoni Report V2.0.3",
85
- testType: "Release",
86
- title: "Ortoni Report By LetCode Koushik",
104
+ port: 1994,
105
+ open: process.env.CI ? "never" : "always",
106
+ folderPath: "report",
107
+ filename: "index.html",
87
108
  logo: "logo.png",
109
+ title: "Ortoni Test Report",
110
+ showProject: false,
111
+ projectName: "Ortoni-Report",
112
+ testType: "Release - Oct 30, 2024",
113
+ authorName: "Koushik (LetCode with Koushik)",
114
+ preferredTheme: "light",
88
115
  base64Image: true,
116
+ };
117
+
118
+ export default defineConfig({
119
+ reporter: [["ortoni-report", reportConfig], ["dot"]],
120
+ // Other Playwright configurations
121
+ });
122
+ ```
123
+
124
+ ### Configure in `playwright.config.js`
125
+
126
+ ```javascript
127
+ import { defineConfig } from "@playwright/test";
128
+
129
+ const reportConfig = {
130
+ port: 1994,
131
+ open: process.env.CI ? "never" : "always",D
89
132
  folderPath: "report",
90
- showProject: false
91
- }
133
+ filename: "index.html",
134
+ logo: "logo.png",
135
+ title: "Ortoni Test Report",
136
+ showProject: false,
137
+ projectName: "Ortoni-Report",
138
+ testType: "Release - Oct 21, 2024",
139
+ authorName: "Koushik (LetCode with Koushik)",
140
+ preferredTheme: "light",
141
+ base64Image: true,
142
+ };
92
143
 
93
144
  export default defineConfig({
94
- reporter: [['ortoni-report', reportConfig], ['dot']],
95
- // Other Playwright configurations
145
+ reporter: [["ortoni-report", reportConfig], ["dot"]],
146
+ // Other Playwright configurations
96
147
  });
97
148
  ```
98
- ### Comprehensive Test Details
99
149
 
100
- - **Rich Test Information**: Each test includes details like title, status, duration, tags, errors, steps, logs, video, and screenshot.
101
- - **Color-coded Status**: Status indicators (green for passed, red for failed, yellow for skipped) for quick identification.
102
- - **Static HTML Report**: Single file can be shared easily
150
+ ## Detailed Test Information
103
151
 
104
- ### Future Plans
152
+ - **Rich Test Data**: Each test includes details such as title, status, duration, tags, errors, steps, logs, video, and screenshots.
153
+ - **Color-Coded Status**: Green for passed, red for failed, yellow for skipped—offering a quick overview of test outcomes.
154
+ - **Static HTML Report**: Self-contained, standalone HTML files make sharing and storing reports convenient.
105
155
 
106
- - **Enhanced Customization**: Additional options for customizing report appearance and structure.
107
- - **CI/CD Integration**: Improved support for CI/CD environments.
156
+ ---
157
+
158
+ ## Changelog
159
+
160
+ 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
161
 
109
- ### Change Logs
162
+ ---
110
163
 
111
- Explore the latest updates and changes in our [Changelog](https://github.com/ortoniKC/ortoni-report/blob/main/changelog.md).
164
+ ## License
112
165
 
113
- ### License
166
+ This project is licensed under the terms of the [LICENSE](https://github.com/ortoniKC/ortoni-report/blob/main/LICENSE.md).
114
167
 
115
- View the [LICENSE](https://github.com/ortoniKC/ortoni-report/blob/main/LICENSE.md) for licensing details.
168
+ ---
116
169
 
117
- ### Feedback and Contributions
170
+ ## Feedback and Contributions
118
171
 
119
- We value your feedback and contributions! For issues, suggestions, or contributions, visit our [GitHub repository](https://github.com/ortoniKC/ortoni-report).
172
+ 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).
120
173
 
121
- Thank you for choosing Ortoni Report. We're committed to enhancing your Playwright testing experience.
174
+ ---
122
175
 
123
- ### Support
124
- UPI: ortoni@axl (Koushik Chatterjee)
176
+ ## Support
125
177
 
178
+ If you'd like to support this project, you can donate via UPI:
179
+
180
+ **UPI**: ortoni@axl (Koushik Chatterjee)
181
+
182
+ ---
183
+
184
+ Thank you for using **Ortoni Report**! We’re committed to providing you with a superior Playwright testing experience.
126
185
 
127
186
  ---
128
187
 
129
188
  **LetCode with Koushik**
130
189
 
131
- ---
190
+ ---