def dealwith_exception(self, e): ''' deal with the exception.such as: save the exception stack or exception message ''' save_fail_log() log_test_framework('TestCaseBase','Exception is :' + str(e)) log_test_framework('TestCaseBase','Traceback :' + traceback.format_exc())
def test_case_end(self): log_test_case(self.case_config_map[fs_wrapper.CASE_NAME_ATTR], '%s: end' % self.tag) if can_continue() and case_flag == True: log_test_case(self.case_config_map[fs_wrapper.CASE_NAME_ATTR], '%s: case pass' % self.tag) print_report_line(self.case_config_map[fs_wrapper.CASE_NAME_ATTR] + '%s: \tpass' % self.tag) else: log_test_case(self.case_config_map[fs_wrapper.CASE_NAME_ATTR], '%s: case fail' % self.tag) print_report_line(self.case_config_map[fs_wrapper.CASE_NAME_ATTR] + '%s: \tfail' % self.tag) save_fail_log()
def test_case_end(self): ''' record the case result ''' log_test_case(self.case_config_map[fs_wrapper.CASE_NAME_ATTR], TAG + ' : end') if can_continue() and case_flag == True: log_test_case(self.case_config_map[fs_wrapper.CASE_NAME_ATTR], TAG + ' : case pass') print_report_line(self.case_config_map[fs_wrapper.CASE_NAME_ATTR] + TAG + ' : \tpass') else: log_test_case(self.case_config_map[fs_wrapper.CASE_NAME_ATTR], TAG + ' : case fail') print_report_line(self.case_config_map[fs_wrapper.CASE_NAME_ATTR] + TAG + ' : \tfail') save_fail_log()
def test_case_end(self): ''' record the case result ''' ''' @attention: modify by min.sheng ''' log_test_case(self.case_config_map[fs_wrapper.CASE_NAME_ATTR], TAG + ' : end') if can_continue() and case_flag == True: # shutdown() log_test_case(self.case_config_map[fs_wrapper.CASE_NAME_ATTR], TAG + ': case pass') print_report_line(self.case_config_map[fs_wrapper.CASE_NAME_ATTR] + TAG + ' : \tpass') else: log_test_case(self.case_config_map[fs_wrapper.CASE_NAME_ATTR], TAG + ' : case fail') print_report_line(self.case_config_map[fs_wrapper.CASE_NAME_ATTR] + TAG + ' : \tfail') save_fail_log() p.terminate()