Update junitxml.py
Modified the junitxml file to add the status of each executed test scripts along with total test cases passed successfully
This commit is contained in:
parent
aa72496d24
commit
fe1a92fe47
|
@ -75,7 +75,7 @@ def merge_family(left, right) -> None:
|
||||||
|
|
||||||
|
|
||||||
families = {}
|
families = {}
|
||||||
families["_base"] = {"testcase": ["classname", "name"]}
|
families["_base"] = {"testcase": ["classname", "name", "status"]}
|
||||||
families["_base_legacy"] = {"testcase": ["file", "line", "url"]}
|
families["_base_legacy"] = {"testcase": ["file", "line", "url"]}
|
||||||
|
|
||||||
# xUnit 1.x inherits legacy attributes.
|
# xUnit 1.x inherits legacy attributes.
|
||||||
|
@ -126,6 +126,7 @@ class _NodeReporter:
|
||||||
"classname": ".".join(classnames),
|
"classname": ".".join(classnames),
|
||||||
"name": bin_xml_escape(names[-1]),
|
"name": bin_xml_escape(names[-1]),
|
||||||
"file": testreport.location[0],
|
"file": testreport.location[0],
|
||||||
|
"status":testreport.outcome
|
||||||
}
|
}
|
||||||
if testreport.location[1] is not None:
|
if testreport.location[1] is not None:
|
||||||
attrs["line"] = str(testreport.location[1])
|
attrs["line"] = str(testreport.location[1])
|
||||||
|
@ -667,6 +668,7 @@ class LogXML:
|
||||||
errors=str(self.stats["error"]),
|
errors=str(self.stats["error"]),
|
||||||
failures=str(self.stats["failure"]),
|
failures=str(self.stats["failure"]),
|
||||||
skipped=str(self.stats["skipped"]),
|
skipped=str(self.stats["skipped"]),
|
||||||
|
passed=str(self.stats["passed"]),
|
||||||
tests=str(numtests),
|
tests=str(numtests),
|
||||||
time="%.3f" % suite_time_delta,
|
time="%.3f" % suite_time_delta,
|
||||||
timestamp=datetime.fromtimestamp(self.suite_start_time).isoformat(),
|
timestamp=datetime.fromtimestamp(self.suite_start_time).isoformat(),
|
||||||
|
|
Loading…
Reference in New Issue