本文整理汇总了Python中bzt.modules.reporting.FinalStatus.aggregated_results方法的典型用法代码示例。如果您正苦于以下问题:Python FinalStatus.aggregated_results方法的具体用法?Python FinalStatus.aggregated_results怎么用?Python FinalStatus.aggregated_results使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bzt.modules.reporting.FinalStatus
的用法示例。
在下文中一共展示了FinalStatus.aggregated_results方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_func_report_all_no_stacktrace
# 需要导入模块: from bzt.modules.reporting import FinalStatus [as 别名]
# 或者: from bzt.modules.reporting.FinalStatus import aggregated_results [as 别名]
def test_func_report_all_no_stacktrace(self):
obj = FinalStatus()
obj.engine = EngineEmul()
obj.parameters = BetterDict.from_dict({"report-tests": "all", "print-stacktrace": False})
self.sniff_log(obj.log)
obj.prepare()
obj.startup()
obj.shutdown()
obj.aggregated_results(*self.__get_func_tree())
obj.post_process()
info_log = self.log_recorder.info_buff.getvalue()
self.assertIn("Total: 3 tests", info_log)
self.assertIn("Test TestClass.case1 - PASSED", info_log)
self.assertIn("Test TestClass.case2 - FAILED", info_log)
self.assertIn("Test TestClass.case3 - BROKEN", info_log)
self.assertNotIn("stacktrace2", info_log)
self.assertNotIn("stacktrace3", info_log)
示例2: test_func_report
# 需要导入模块: from bzt.modules.reporting import FinalStatus [as 别名]
# 或者: from bzt.modules.reporting.FinalStatus import aggregated_results [as 别名]
def test_func_report(self):
obj = FinalStatus()
obj.engine = EngineEmul()
obj.parameters = BetterDict()
self.sniff_log(obj.log)
obj.prepare()
obj.startup()
obj.shutdown()
obj.aggregated_results(*self.__get_func_tree())
obj.post_process()
info_log = self.log_recorder.info_buff.getvalue()
warn_log = self.log_recorder.warn_buff.getvalue()
self.assertIn("Total: 3 tests", info_log)
self.assertIn("Test TestClass.case2 failed: something broke", warn_log)
self.assertIn("stacktrace2", warn_log)
self.assertIn("Test TestClass.case3 failed: something is badly broken", warn_log)
self.assertIn("stacktrace3", warn_log)