diff --git a/src/xdevice/_core/report/reporter_helper.py b/src/xdevice/_core/report/reporter_helper.py index 994e6eeb210384cff3422a19a8eef49510158575..1aaf751cacd26c85f78bee411ccfa10ce78059df 100755 --- a/src/xdevice/_core/report/reporter_helper.py +++ b/src/xdevice/_core/report/reporter_helper.py @@ -73,6 +73,7 @@ class ReportConstant: blocked = "blocked" ignored = "ignored" unavailable = "unavailable" + not_run = "notrun" message = "message" # case result constants @@ -401,7 +402,7 @@ class Case: return self.status in [ReportConstant.unavailable] def is_ignored(self): - return self.status in [ReportConstant.skip] + return self.status in [ReportConstant.skip, ReportConstant.not_run] def get_result(self): if self.is_failed(): diff --git a/src/xdevice/_core/report/result_reporter.py b/src/xdevice/_core/report/result_reporter.py index 300292f45d3bf07b9de2d38db254dae016a408c1..463f7b4da1f87af8c142800c3b32af7fcf283660 100755 --- a/src/xdevice/_core/report/result_reporter.py +++ b/src/xdevice/_core/report/result_reporter.py @@ -164,6 +164,12 @@ class ResultReporter(IReporter): ReportConstant.empty_name: child.set(ReportConstant.module_name, module_name) self._check_tests_and_unavailable(child) + # covert "notrun" to "ignored" for the test case status + for element in child: + if element.get(ReportConstant.status, "") == \ + ReportConstant.not_run: + ignored = int(child.get(ReportConstant.ignored, 0)) + 1 + child.set(ReportConstant.ignored, "%s" % ignored) test_suite_elements.append(child) for update_attribute in need_update_attributes: update_value = child.get(update_attribute, 0)