pytest-html-plus 0.4.7__tar.gz → 0.4.8__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.4.7 → pytest_html_plus-0.4.8}/PKG-INFO +2 -2
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pyproject.toml +2 -2
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/compute_report_metadata.py +2 -2
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/generate_html_report.py +26 -7
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/plugin.py +16 -4
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/utils.py +1 -1
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/LICENSE +0 -0
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/README.md +0 -0
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/__init__.py +0 -0
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/compute_filter_counts.py +0 -0
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/extract_link.py +0 -0
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/json_merge.py +0 -0
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/json_to_xml_converter.py +0 -0
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/resolver_driver.py +0 -0
- {pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/send_email_report.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pytest-html-plus
|
|
3
|
-
Version: 0.4.
|
|
4
|
-
Summary: Generate Actionable, automatic screenshots, unified Pytest HTML report in less than 3 seconds — no hooks, merge plugins, no config, xdist-ready.
|
|
3
|
+
Version: 0.4.8
|
|
4
|
+
Summary: Generate Actionable, automatic screenshots, unified Mobile friendly Pytest HTML report in less than 3 seconds — no hooks, merge plugins, no config, xdist-ready.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: pytest,pytest-html-plus,pytest-plugin,html-test-report,beautiful-test-report,shareable-test-results,test-report,test-results,unit-test-report,functional-test-report,test-summary,reporting,python-testing,automated-testing,test-runner,report-generator,continuous-integration,ci-cd,github-actions,jenkins,pytest-html,pytest-report
|
|
7
7
|
Author: reporterplus
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pytest-html-plus"
|
|
3
|
-
version = "0.4.
|
|
4
|
-
description = "Generate Actionable, automatic screenshots, unified Pytest HTML report in less than 3 seconds — no hooks, merge plugins, no config, xdist-ready."
|
|
3
|
+
version = "0.4.8"
|
|
4
|
+
description = "Generate Actionable, automatic screenshots, unified Mobile friendly Pytest HTML report in less than 3 seconds — no hooks, merge plugins, no config, xdist-ready."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = ["reporterplus"]
|
|
7
7
|
license = "MIT"
|
{pytest_html_plus-0.4.7 → pytest_html_plus-0.4.8}/pytest_html_plus/compute_report_metadata.py
RENAMED
|
@@ -8,8 +8,8 @@ from pytest_html_plus.utils import is_main_worker, get_env_marker, get_report_ti
|
|
|
8
8
|
def write_plus_metadata_if_main_worker(config, report_path, output_path="plus_metadata.json", **kwargs):
|
|
9
9
|
if not is_main_worker():
|
|
10
10
|
return
|
|
11
|
-
branch = kwargs.get("git_branch", "
|
|
12
|
-
commit = kwargs.get("git_commit", "
|
|
11
|
+
branch = kwargs.get("git_branch", "Pass --git-branch to populate git metadata")
|
|
12
|
+
commit = kwargs.get("git_commit", "Pass --git-commit to populate git metadata")
|
|
13
13
|
metadata = {
|
|
14
14
|
"report_title": get_report_title(output_path=report_path),
|
|
15
15
|
"environment": get_env_marker(config),
|
|
@@ -184,8 +184,8 @@ class JSONReporter:
|
|
|
184
184
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
185
185
|
<style>
|
|
186
186
|
|
|
187
|
-
body {{ font-family: Arial, sans-serif; padding: 1rem; background: #
|
|
188
|
-
.test {{ border: 1px solid #ddd; margin-bottom: 0.5rem; border-radius: 5px; background:
|
|
187
|
+
body {{ font-family: Arial, sans-serif; padding: 1rem; background: #f2f4f7; }}
|
|
188
|
+
.test {{ border: 1px solid #ddd; margin-bottom: 0.5rem; border-radius: 5px; background: #ffffff; }}
|
|
189
189
|
.header {{ padding: 0.5rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }}
|
|
190
190
|
.header.passed {{ background: #e6f4ea; color: #2f7a33; }}
|
|
191
191
|
.header.failed {{ background: #fdecea; color: #a83232; }}
|
|
@@ -293,6 +293,13 @@ class JSONReporter:
|
|
|
293
293
|
width: 100%;
|
|
294
294
|
border-collapse: collapse;
|
|
295
295
|
}}
|
|
296
|
+
|
|
297
|
+
.muted-hint code {{
|
|
298
|
+
background: #f1f5f9;
|
|
299
|
+
padding: 2px 4px;
|
|
300
|
+
border-radius: 4px;
|
|
301
|
+
font-size: 0.9em;
|
|
302
|
+
}}
|
|
296
303
|
|
|
297
304
|
.report-metadata th, .report-metadata td {{
|
|
298
305
|
text-align: left;
|
|
@@ -587,8 +594,8 @@ class JSONReporter:
|
|
|
587
594
|
</script>
|
|
588
595
|
</head>
|
|
589
596
|
<body>
|
|
590
|
-
<div class="report-metadata">
|
|
591
|
-
<h2 onclick="this.nextElementSibling.classList.toggle('hidden')" style="cursor: pointer; font-size: 12px;">
|
|
597
|
+
<div class="report-metadata" style="background: #f2f4f7;">
|
|
598
|
+
<h2 onclick="this.nextElementSibling.classList.toggle('hidden')" style="cursor: pointer; font-size: 12px; ">
|
|
592
599
|
Execution Metadata (click to toggle)
|
|
593
600
|
{self.generate_copy_button(self.metadata, "metadata")}
|
|
594
601
|
</h2>
|
|
@@ -683,9 +690,21 @@ class JSONReporter:
|
|
|
683
690
|
|
|
684
691
|
# Add checkboxes for all markers
|
|
685
692
|
marker_counts = self.filters.get("marker_counts", {})
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
693
|
+
if not marker_counts:
|
|
694
|
+
html += (
|
|
695
|
+
'<span class="muted-hint">'
|
|
696
|
+
'Use <code>pytest.mark.*</code> to enable marker filters'
|
|
697
|
+
'</span>'
|
|
698
|
+
)
|
|
699
|
+
else:
|
|
700
|
+
for marker in sorted(marker_counts):
|
|
701
|
+
count = marker_counts[marker]
|
|
702
|
+
html += (
|
|
703
|
+
f'<label>'
|
|
704
|
+
f'<input type="checkbox" value="{marker}" /> '
|
|
705
|
+
f'{marker} ({count})'
|
|
706
|
+
f'</label> '
|
|
707
|
+
)
|
|
689
708
|
|
|
690
709
|
html += '<div id="tests-container">'
|
|
691
710
|
|
|
@@ -177,8 +177,8 @@ def pytest_sessionfinish(session, exitstatus):
|
|
|
177
177
|
|
|
178
178
|
def pytest_sessionstart(session):
|
|
179
179
|
html_output = session.config.getoption("--html-output") or "report_output"
|
|
180
|
-
git_branch = session.config.getoption("--git-branch") or "
|
|
181
|
-
git_commit = session.config.getoption("--git-commit") or "
|
|
180
|
+
git_branch = session.config.getoption("--git-branch") or "Pass --git-branch to populate git metadata"
|
|
181
|
+
git_commit = session.config.getoption("--git-commit") or "Pass --git-commit to populate git metadata"
|
|
182
182
|
configure_logging()
|
|
183
183
|
session.config.addinivalue_line(
|
|
184
184
|
"markers", "link(url): Add a link to external test case or documentation."
|
|
@@ -242,13 +242,25 @@ def pytest_addoption(parser):
|
|
|
242
242
|
parser.addoption(
|
|
243
243
|
"--git-branch",
|
|
244
244
|
action="store",
|
|
245
|
-
default="
|
|
245
|
+
default="Pass --git-branch to populate git metadata",
|
|
246
246
|
help="Helps show branch information on the report"
|
|
247
247
|
)
|
|
248
248
|
parser.addoption(
|
|
249
249
|
"--git-commit",
|
|
250
250
|
action="store",
|
|
251
|
-
default="
|
|
251
|
+
default="Pass --git-commit to populate git metadata",
|
|
252
|
+
help="Helps show commitId information on the report"
|
|
253
|
+
)
|
|
254
|
+
parser.addoption(
|
|
255
|
+
"--env",
|
|
256
|
+
action="store",
|
|
257
|
+
default="Pass --env or --environment <name> to populate environment",
|
|
258
|
+
help="Helps show commitId information on the report"
|
|
259
|
+
)
|
|
260
|
+
parser.addoption(
|
|
261
|
+
"--environment",
|
|
262
|
+
action="store",
|
|
263
|
+
default="Pass --env or --environment <name> to populate environment",
|
|
252
264
|
help="Helps show commitId information on the report"
|
|
253
265
|
)
|
|
254
266
|
|
|
@@ -7,7 +7,7 @@ def get_env_marker(config):
|
|
|
7
7
|
for arg in ("--env", "--environment"):
|
|
8
8
|
if config.getoption(arg.lstrip("-").replace("-", "_"), default=None):
|
|
9
9
|
return config.getoption(arg.lstrip("-").replace("-", "_"))
|
|
10
|
-
return "
|
|
10
|
+
return "Pass --env <name> to populate environment"
|
|
11
11
|
|
|
12
12
|
def get_report_title(output_path):
|
|
13
13
|
report_path = output_path
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|