Skip to content

Commit 18c7b5c

Browse files
author
Sean Smith
committed
Change generate_json_report to parse root <testsuites> tag
On August 15th, `pytest` released version 5.1.0 https://pypi.org/project/pytest/#history This version adds a new root `<testsuites>` tag. See pytest-dev/pytest#5477 ```xml <testsuites> <testsuite errors="0" failures="18" hostname="3a266349df18" name="pytest" skipped="0" tests="30" time="13427.235" timestamp="2019-08-23T04:05:15.798369"> ... ``` ```xml <testsuite errors="204" failures="9" name="pytest" skipped="0" tests="793" time="947565.5930000005"> ... ``` This patch parses that tag properly. Signed-off-by: Sean Smith <[email protected]>
1 parent 4a26d5c commit 18c7b5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/integration-tests/reports_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def generate_json_report(test_results_dir, save_to_file=True):
7676
result_to_label_mapping = {"skipped": "skipped", "failure": "failures", "error": "errors"}
7777
results = {"all": _empty_results_dict()}
7878
xml = untangle.parse(test_report_file)
79-
for testcase in xml.testsuite.children:
79+
for testcase in xml.testsuites.testsuite.children:
8080
label = "succeeded"
8181
for key, value in result_to_label_mapping.items():
8282
if hasattr(testcase, key):

0 commit comments

Comments
 (0)