pytest-html-plus 0.3.4__tar.gz
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.
- pytest_html_plus-0.3.4/LICENSE +21 -0
- pytest_html_plus-0.3.4/PKG-INFO +213 -0
- pytest_html_plus-0.3.4/README.md +190 -0
- pytest_html_plus-0.3.4/pyproject.toml +53 -0
- pytest_html_plus-0.3.4/pytest_html_plus/__init__.py +0 -0
- pytest_html_plus-0.3.4/pytest_html_plus/compute_filter_counts.py +30 -0
- pytest_html_plus-0.3.4/pytest_html_plus/extract_link.py +10 -0
- pytest_html_plus-0.3.4/pytest_html_plus/generate_html_report.py +706 -0
- pytest_html_plus-0.3.4/pytest_html_plus/json_merge.py +53 -0
- pytest_html_plus-0.3.4/pytest_html_plus/json_to_xml_converter.py +91 -0
- pytest_html_plus-0.3.4/pytest_html_plus/plugin.py +322 -0
- pytest_html_plus-0.3.4/pytest_html_plus/resolver_driver.py +31 -0
- pytest_html_plus-0.3.4/pytest_html_plus/send_email_report.py +64 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ReporterPlus
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: pytest-html-plus
|
|
3
|
+
Version: 0.3.4
|
|
4
|
+
Summary: Auto-generated HTML reports with filters, screenshots, logs, flaky detection & more β all without writing a single line of config.
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: pytest,html-report,pytest-plugin,test-report,test-results,test-summary,reporting,python-testing,automated-testing,test-runner,report-generator,continuous-integration,ci-cd,pytest-html,pytest-report
|
|
7
|
+
Author: Emjey
|
|
8
|
+
Requires-Python: >=3.9,<4.0
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Requires-Dist: keyring (>=25.6.0,<26.0.0)
|
|
17
|
+
Requires-Dist: yagmail (>=0.15.293,<0.16.0)
|
|
18
|
+
Project-URL: Homepage, https://github.com/reporterplus/pytest-html-plus
|
|
19
|
+
Project-URL: Source, https://github.com/reporterplus/pytest-html-plus
|
|
20
|
+
Project-URL: Tracker, https://github.com/reporterplus/pytest-html-plus/issues
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# π§ͺ pytest-html-plus - A Single page, actionable, plug-and-play unified Test Reports:
|
|
24
|
+
|
|
25
|
+
## Get a single, easy-to-read HTML report summarizing all your test results β no hassle, just clarity. Detect **flaky tests**, and optionally send reports via email**. Works beautifully with or without `xdist`.
|
|
26
|
+
|
|
27
|
+
[](https://pepy.tech/projects/pytest-reporter-plus)    [](https://github.com/reach2jeyan/pytest-report-plus/actions/workflows/unit-test.yml)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## π Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install pytest-html-plus
|
|
34
|
+
# or with Poetry
|
|
35
|
+
poetry add pytest-html-plus
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## π§Ύ Usage
|
|
39
|
+
|
|
40
|
+
Generate HTML + JSON reports:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pytest
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If you are running with xdist
|
|
47
|
+
|
|
48
|
+
```commandline
|
|
49
|
+
pytest -n numberOfWorkers
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Youβll get:
|
|
53
|
+
|
|
54
|
+
report.html β a clean, styled HTML report
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Available Options
|
|
59
|
+
|
|
60
|
+
| Option | Description | Default | Choices |
|
|
61
|
+
|-------------------------|-----------------------------------------------------|---------------------|-----------------------------------|
|
|
62
|
+
| `--json-report` | Path to save individual JSON test reports | `final_report.json` | *Any valid file path* |
|
|
63
|
+
| `--capture-screenshots` | When to capture screenshots | `failed` | `failed`, `all`, `none` |
|
|
64
|
+
| `--html-output` | Directory to output HTML reports | `report_output` | *Any valid directory* |
|
|
65
|
+
| `--screenshots` | Directory where screenshots will be stored | `screenshots` | *Any valid directory* |
|
|
66
|
+
| `--send-email` | Send HTML report via email after the test run | `False` | `True`, `False` |
|
|
67
|
+
| `--should-open-report` | Open your HTML report automatically post completion | `failed` | `always`, `failed`, `never` |
|
|
68
|
+
| `--generate-xml` | Easily generate combined xml of all runs | `False` | `False`, `True` |
|
|
69
|
+
| `--xml-report` | Path to output the XML report (used with --generate-xml) | `None` | *Any valid file path* |
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
# Keep using your regular pytest commands β just plug this in to unlock the below powerful reporting features with zero extra effort.
|
|
75
|
+
|
|
76
|
+
## β¨ Features
|
|
77
|
+
|
|
78
|
+
#### π§© Seamless Combined XML Export to your favourite test management tools β No Plugins Needed
|
|
79
|
+
Export a fully merged JUnit XML report effortlessly β no external tools or plugins required. (No More merge html additional plugins or steps in your YAML to feed xml reports)
|
|
80
|
+
|
|
81
|
+
β Links, logs, stdout/stderr, and even flaky history β all included
|
|
82
|
+
β Works out-of-the-box with your test management tools (like TestRail, XRay, Zephyr)
|
|
83
|
+
β Just one flag. No extra lines of code. Total traceability.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+

|
|
87
|
+
|
|
88
|
+
#### π·οΈ Tag your tests on the fly!
|
|
89
|
+
With dynamic markers, you can assign tags like `api`, `critical`, or `slow` β or any custom label β at runtime using standard `pytest.mark.*`.
|
|
90
|
+
No need for custom marker definitions. Perfect for smarter filtering, reporting, and analysis.
|
|
91
|
+
|
|
92
|
+

|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
#### Easily track Untracked test scenarios
|
|
96
|
+
|
|
97
|
+

|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
#### π Flaky Test Detection: Automatically flags flaky tests so you can spot and fix inconsistent failures quickly.
|
|
101
|
+
|
|
102
|
+

|
|
103
|
+
|
|
104
|
+
#### πΈ Screenshot Support: View screenshots directly in the report to understand failures faster.
|
|
105
|
+
|
|
106
|
+
#### π§ Email Test Reports: Send your reports via email effortlessly using SendGrid integration.
|
|
107
|
+
|
|
108
|
+

|
|
109
|
+
|
|
110
|
+
#### π’ Spot Slow Tests: Highlights the slowest tests so you know where to optimize your suite.
|
|
111
|
+
|
|
112
|
+

|
|
113
|
+
|
|
114
|
+
#### π Comprehensive output capture: All your test logs with loggers, print() statements, and screenshots are automatically captured and embedded in the report...
|
|
115
|
+
|
|
116
|
+

|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
#### π Universal Test Search + Smart Link Navigation
|
|
120
|
+
|
|
121
|
+
Whether you're trying to trace coverage or track unlinked test cases β this search has your back!
|
|
122
|
+
|
|
123
|
+
Just start typing, and the dashboard will instantly filter tests by:
|
|
124
|
+
|
|
125
|
+
β
Test name
|
|
126
|
+
|
|
127
|
+
β
Linked issue/documentation IDs (like JIRA, Testmo, Notion, etc.)
|
|
128
|
+
|
|
129
|
+
β
Custom URLs or keywords present in the links
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+

|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
### AND MANY MANY MORE
|
|
136
|
+
|
|
137
|
+
## Target Audience
|
|
138
|
+
|
|
139
|
+
This plugin is aimed at those who are:
|
|
140
|
+
|
|
141
|
+
- Tired of writing extra code just to generate reports or capture screenshots
|
|
142
|
+
|
|
143
|
+
- Manually attaching logs or outputs to test results
|
|
144
|
+
|
|
145
|
+
- Are frustrated with archiving folders full of assets, CSS, JS, and dashboards just to share test results.
|
|
146
|
+
|
|
147
|
+
- Donβt want to refactor existing test suites or tag everything with new decorators just to integrate with a reporting tool.
|
|
148
|
+
|
|
149
|
+
- Prefer simplicity β a zero-config, zero code, lightweight report that still looks clean, useful, and polished.
|
|
150
|
+
|
|
151
|
+
- Want βjust enoughβ β not bare-bones plain text, not a full dashboard with database setup β just a portable HTML report that STILL supports features like links, screenshots, and markers.
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## Comparison with Alternatives
|
|
155
|
+
Most existing pytest reporter tools:
|
|
156
|
+
|
|
157
|
+
Only generate HTML reports from a single run (by making you write code for creating xmls like pytest-html) OR they generate all the JS and png files that are not the scope of test results and force you to archive it.
|
|
158
|
+
|
|
159
|
+
Heavy duty with bloated charts and other test management features(when they arent your only test management system either) increasing your archive size.
|
|
160
|
+
|
|
161
|
+
This plugin aims to fill those gaps by acting as a companion layer on top of the JSON report, focusing on:
|
|
162
|
+
|
|
163
|
+
π Merge + flakiness intelligence
|
|
164
|
+
|
|
165
|
+
π Traceability via metadata
|
|
166
|
+
|
|
167
|
+
π§Ό HTML thatβs both readable and minimal
|
|
168
|
+
|
|
169
|
+
π§Ό Quickly copy test paths and run in your local
|
|
170
|
+
|
|
171
|
+
## π§ Email Report (Optional)
|
|
172
|
+
|
|
173
|
+
Send the HTML report via email using --send-email. Please note you will need your own sendgrid setup to use this feature
|
|
174
|
+
|
|
175
|
+
Create an emailenv file in your project folder that has the following
|
|
176
|
+
|
|
177
|
+
```commandline
|
|
178
|
+
sender_email=you@example.com
|
|
179
|
+
recipient_email=team@example.com
|
|
180
|
+
subject=Your Test Report
|
|
181
|
+
smtp_server=smtp.sendgrid.net
|
|
182
|
+
smtp_port=587
|
|
183
|
+
email_password=your_sendgrid_api_key
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Run
|
|
188
|
+
|
|
189
|
+
```commandline
|
|
190
|
+
pytest --send-email
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Contributions
|
|
194
|
+
|
|
195
|
+
We welcome pull requests, issues, and feature suggestions from the community.
|
|
196
|
+
Before contributing, please take a moment to review our contribution guidelines and code of conduct.
|
|
197
|
+
Your involvement helps make this tool better for everyone!
|
|
198
|
+
|
|
199
|
+
### Setting up the project is pretty simple
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
docker build -t pytest-html-plus .
|
|
203
|
+
docker run -it pytest-html-plus /bin/bash
|
|
204
|
+
poetry install --dev
|
|
205
|
+
|
|
206
|
+
poetry run pytest tests/
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
## π License
|
|
211
|
+
|
|
212
|
+
MIT
|
|
213
|
+
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# π§ͺ pytest-html-plus - A Single page, actionable, plug-and-play unified Test Reports:
|
|
2
|
+
|
|
3
|
+
## Get a single, easy-to-read HTML report summarizing all your test results β no hassle, just clarity. Detect **flaky tests**, and optionally send reports via email**. Works beautifully with or without `xdist`.
|
|
4
|
+
|
|
5
|
+
[](https://pepy.tech/projects/pytest-reporter-plus)    [](https://github.com/reach2jeyan/pytest-report-plus/actions/workflows/unit-test.yml)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## π Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install pytest-html-plus
|
|
12
|
+
# or with Poetry
|
|
13
|
+
poetry add pytest-html-plus
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## π§Ύ Usage
|
|
17
|
+
|
|
18
|
+
Generate HTML + JSON reports:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pytest
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If you are running with xdist
|
|
25
|
+
|
|
26
|
+
```commandline
|
|
27
|
+
pytest -n numberOfWorkers
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Youβll get:
|
|
31
|
+
|
|
32
|
+
report.html β a clean, styled HTML report
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Available Options
|
|
37
|
+
|
|
38
|
+
| Option | Description | Default | Choices |
|
|
39
|
+
|-------------------------|-----------------------------------------------------|---------------------|-----------------------------------|
|
|
40
|
+
| `--json-report` | Path to save individual JSON test reports | `final_report.json` | *Any valid file path* |
|
|
41
|
+
| `--capture-screenshots` | When to capture screenshots | `failed` | `failed`, `all`, `none` |
|
|
42
|
+
| `--html-output` | Directory to output HTML reports | `report_output` | *Any valid directory* |
|
|
43
|
+
| `--screenshots` | Directory where screenshots will be stored | `screenshots` | *Any valid directory* |
|
|
44
|
+
| `--send-email` | Send HTML report via email after the test run | `False` | `True`, `False` |
|
|
45
|
+
| `--should-open-report` | Open your HTML report automatically post completion | `failed` | `always`, `failed`, `never` |
|
|
46
|
+
| `--generate-xml` | Easily generate combined xml of all runs | `False` | `False`, `True` |
|
|
47
|
+
| `--xml-report` | Path to output the XML report (used with --generate-xml) | `None` | *Any valid file path* |
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
# Keep using your regular pytest commands β just plug this in to unlock the below powerful reporting features with zero extra effort.
|
|
53
|
+
|
|
54
|
+
## β¨ Features
|
|
55
|
+
|
|
56
|
+
#### π§© Seamless Combined XML Export to your favourite test management tools β No Plugins Needed
|
|
57
|
+
Export a fully merged JUnit XML report effortlessly β no external tools or plugins required. (No More merge html additional plugins or steps in your YAML to feed xml reports)
|
|
58
|
+
|
|
59
|
+
β Links, logs, stdout/stderr, and even flaky history β all included
|
|
60
|
+
β Works out-of-the-box with your test management tools (like TestRail, XRay, Zephyr)
|
|
61
|
+
β Just one flag. No extra lines of code. Total traceability.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+

|
|
65
|
+
|
|
66
|
+
#### π·οΈ Tag your tests on the fly!
|
|
67
|
+
With dynamic markers, you can assign tags like `api`, `critical`, or `slow` β or any custom label β at runtime using standard `pytest.mark.*`.
|
|
68
|
+
No need for custom marker definitions. Perfect for smarter filtering, reporting, and analysis.
|
|
69
|
+
|
|
70
|
+

|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
#### Easily track Untracked test scenarios
|
|
74
|
+
|
|
75
|
+

|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
#### π Flaky Test Detection: Automatically flags flaky tests so you can spot and fix inconsistent failures quickly.
|
|
79
|
+
|
|
80
|
+

|
|
81
|
+
|
|
82
|
+
#### πΈ Screenshot Support: View screenshots directly in the report to understand failures faster.
|
|
83
|
+
|
|
84
|
+
#### π§ Email Test Reports: Send your reports via email effortlessly using SendGrid integration.
|
|
85
|
+
|
|
86
|
+

|
|
87
|
+
|
|
88
|
+
#### π’ Spot Slow Tests: Highlights the slowest tests so you know where to optimize your suite.
|
|
89
|
+
|
|
90
|
+

|
|
91
|
+
|
|
92
|
+
#### π Comprehensive output capture: All your test logs with loggers, print() statements, and screenshots are automatically captured and embedded in the report...
|
|
93
|
+
|
|
94
|
+

|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
#### π Universal Test Search + Smart Link Navigation
|
|
98
|
+
|
|
99
|
+
Whether you're trying to trace coverage or track unlinked test cases β this search has your back!
|
|
100
|
+
|
|
101
|
+
Just start typing, and the dashboard will instantly filter tests by:
|
|
102
|
+
|
|
103
|
+
β
Test name
|
|
104
|
+
|
|
105
|
+
β
Linked issue/documentation IDs (like JIRA, Testmo, Notion, etc.)
|
|
106
|
+
|
|
107
|
+
β
Custom URLs or keywords present in the links
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+

|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### AND MANY MANY MORE
|
|
114
|
+
|
|
115
|
+
## Target Audience
|
|
116
|
+
|
|
117
|
+
This plugin is aimed at those who are:
|
|
118
|
+
|
|
119
|
+
- Tired of writing extra code just to generate reports or capture screenshots
|
|
120
|
+
|
|
121
|
+
- Manually attaching logs or outputs to test results
|
|
122
|
+
|
|
123
|
+
- Are frustrated with archiving folders full of assets, CSS, JS, and dashboards just to share test results.
|
|
124
|
+
|
|
125
|
+
- Donβt want to refactor existing test suites or tag everything with new decorators just to integrate with a reporting tool.
|
|
126
|
+
|
|
127
|
+
- Prefer simplicity β a zero-config, zero code, lightweight report that still looks clean, useful, and polished.
|
|
128
|
+
|
|
129
|
+
- Want βjust enoughβ β not bare-bones plain text, not a full dashboard with database setup β just a portable HTML report that STILL supports features like links, screenshots, and markers.
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
## Comparison with Alternatives
|
|
133
|
+
Most existing pytest reporter tools:
|
|
134
|
+
|
|
135
|
+
Only generate HTML reports from a single run (by making you write code for creating xmls like pytest-html) OR they generate all the JS and png files that are not the scope of test results and force you to archive it.
|
|
136
|
+
|
|
137
|
+
Heavy duty with bloated charts and other test management features(when they arent your only test management system either) increasing your archive size.
|
|
138
|
+
|
|
139
|
+
This plugin aims to fill those gaps by acting as a companion layer on top of the JSON report, focusing on:
|
|
140
|
+
|
|
141
|
+
π Merge + flakiness intelligence
|
|
142
|
+
|
|
143
|
+
π Traceability via metadata
|
|
144
|
+
|
|
145
|
+
π§Ό HTML thatβs both readable and minimal
|
|
146
|
+
|
|
147
|
+
π§Ό Quickly copy test paths and run in your local
|
|
148
|
+
|
|
149
|
+
## π§ Email Report (Optional)
|
|
150
|
+
|
|
151
|
+
Send the HTML report via email using --send-email. Please note you will need your own sendgrid setup to use this feature
|
|
152
|
+
|
|
153
|
+
Create an emailenv file in your project folder that has the following
|
|
154
|
+
|
|
155
|
+
```commandline
|
|
156
|
+
sender_email=you@example.com
|
|
157
|
+
recipient_email=team@example.com
|
|
158
|
+
subject=Your Test Report
|
|
159
|
+
smtp_server=smtp.sendgrid.net
|
|
160
|
+
smtp_port=587
|
|
161
|
+
email_password=your_sendgrid_api_key
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Run
|
|
166
|
+
|
|
167
|
+
```commandline
|
|
168
|
+
pytest --send-email
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Contributions
|
|
172
|
+
|
|
173
|
+
We welcome pull requests, issues, and feature suggestions from the community.
|
|
174
|
+
Before contributing, please take a moment to review our contribution guidelines and code of conduct.
|
|
175
|
+
Your involvement helps make this tool better for everyone!
|
|
176
|
+
|
|
177
|
+
### Setting up the project is pretty simple
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
docker build -t pytest-html-plus .
|
|
181
|
+
docker run -it pytest-html-plus /bin/bash
|
|
182
|
+
poetry install --dev
|
|
183
|
+
|
|
184
|
+
poetry run pytest tests/
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
## π License
|
|
189
|
+
|
|
190
|
+
MIT
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "pytest-html-plus"
|
|
3
|
+
version = "0.3.4"
|
|
4
|
+
description = "Auto-generated HTML reports with filters, screenshots, logs, flaky detection & more β all without writing a single line of config."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = ["Emjey", "Karan"]
|
|
7
|
+
license = "MIT"
|
|
8
|
+
packages = [{ include = "pytest_html_plus" }]
|
|
9
|
+
keywords = [
|
|
10
|
+
"pytest",
|
|
11
|
+
"html-report",
|
|
12
|
+
"pytest-plugin",
|
|
13
|
+
"test-report",
|
|
14
|
+
"test-results",
|
|
15
|
+
"test-summary",
|
|
16
|
+
"reporting",
|
|
17
|
+
"python-testing",
|
|
18
|
+
"automated-testing",
|
|
19
|
+
"test-runner",
|
|
20
|
+
"report-generator",
|
|
21
|
+
"continuous-integration",
|
|
22
|
+
"ci-cd",
|
|
23
|
+
"pytest-html",
|
|
24
|
+
"pytest-report"
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
urls.Homepage = "https://github.com/reporterplus/pytest-html-plus"
|
|
28
|
+
urls.Source = "https://github.com/reporterplus/pytest-html-plus"
|
|
29
|
+
urls.Tracker = "https://github.com/reporterplus/pytest-html-plus/issues"
|
|
30
|
+
|
|
31
|
+
[tool.poetry.dependencies]
|
|
32
|
+
python = ">=3.9,<4.0"
|
|
33
|
+
yagmail = ">=0.15.293,<0.16.0"
|
|
34
|
+
keyring = ">=25.6.0,<26.0.0"
|
|
35
|
+
|
|
36
|
+
[tool.poetry.dev-dependencies]
|
|
37
|
+
pytest = "^8.4.1"
|
|
38
|
+
pytest-cov = "^6.2.1"
|
|
39
|
+
playwright = "^1.53.0"
|
|
40
|
+
pytest-playwright = "^0.7.0"
|
|
41
|
+
pytest-xdist = "^3.8.0"
|
|
42
|
+
|
|
43
|
+
[tool.poetry.group.dev.dependencies]
|
|
44
|
+
pytest-rerunfailures = "^15.1"
|
|
45
|
+
|
|
46
|
+
[build-system]
|
|
47
|
+
requires = ["poetry-core"]
|
|
48
|
+
build-backend = "poetry.core.masonry.api"
|
|
49
|
+
|
|
50
|
+
[tool.poetry.plugins."pytest11"]
|
|
51
|
+
pytest_reporter_plus = "pytest_html_plus.plugin"
|
|
52
|
+
|
|
53
|
+
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from collections import Counter, defaultdict
|
|
2
|
+
|
|
3
|
+
def compute_filter_count(results):
|
|
4
|
+
filters = Counter()
|
|
5
|
+
marker_counts = defaultdict(int)
|
|
6
|
+
|
|
7
|
+
for test in results:
|
|
8
|
+
status = test.get("status")
|
|
9
|
+
flaky = test.get("flaky", False)
|
|
10
|
+
links = test.get("links", [])
|
|
11
|
+
markers = test.get("markers", [])
|
|
12
|
+
|
|
13
|
+
if status == "failed" and not flaky:
|
|
14
|
+
filters["failed"] += 1
|
|
15
|
+
if flaky:
|
|
16
|
+
filters["flaky"] += 1
|
|
17
|
+
if status == "skipped":
|
|
18
|
+
filters["skipped"] += 1
|
|
19
|
+
if not links:
|
|
20
|
+
filters["untracked"] += 1
|
|
21
|
+
|
|
22
|
+
for marker in markers:
|
|
23
|
+
marker_counts[marker] += 1
|
|
24
|
+
|
|
25
|
+
total = len(results)
|
|
26
|
+
filters["total"] = total
|
|
27
|
+
filters["passed"] = total - filters["failed"] - filters["skipped"] # estimate
|
|
28
|
+
|
|
29
|
+
filters["marker_counts"] = dict(marker_counts)
|
|
30
|
+
return dict(filters)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
def extract_links_from_item(item):
|
|
2
|
+
links = []
|
|
3
|
+
possible_link_markers = ["link", "testcase", "jira", "issue", "ticket"]
|
|
4
|
+
|
|
5
|
+
for marker_name in possible_link_markers:
|
|
6
|
+
for marker in item.iter_markers(name=marker_name):
|
|
7
|
+
if marker.args:
|
|
8
|
+
links.extend(str(arg) for arg in marker.args)
|
|
9
|
+
|
|
10
|
+
return links
|