def finish_total_test(): env.TOTAL_STOP_TIME = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") print((">>>>>> [%s] => [%s], duration [%s], case [%s], pass [%s], fail [%s] <<<<<<" % ( env.TOTAL_START_TIME, env.TOTAL_STOP_TIME, datetime.datetime.strptime(env.TOTAL_STOP_TIME, "%Y-%m-%d %H:%M:%S") - datetime.datetime.strptime(env.TOTAL_START_TIME, "%Y-%m-%d %H:%M:%S"), env.TOTAL_TESTCASE_PASS + env.TOTAL_TESTCASE_FAIL, env.TOTAL_TESTCASE_PASS, env.TOTAL_TESTCASE_FAIL, ) )) print(( ">>>>>> [%s] => [%s]" % (env.TOTAL_START_TIME, common.get_version_info()) )) htmlreport.generate_html_report([env.TOTAL_START_TIME, env.TOTAL_STOP_TIME, datetime.datetime.strptime(env.TOTAL_STOP_TIME, "%Y-%m-%d %H:%M:%S") - datetime.datetime.strptime(env.TOTAL_START_TIME, "%Y-%m-%d %H:%M:%S"), env.TOTAL_TESTCASE_PASS+env.TOTAL_TESTCASE_FAIL, env.TOTAL_TESTCASE_PASS, env.TOTAL_TESTCASE_FAIL], env.HTMLREPORT_TESTCASES, countdown=False) htmlreport.save_current_report_to_repository() htmlreport.generate_report_history() htmlreport.generate_html_report([env.TOTAL_START_TIME, env.TOTAL_STOP_TIME, datetime.datetime.strptime(env.TOTAL_STOP_TIME, "%Y-%m-%d %H:%M:%S") - datetime.datetime.strptime(env.TOTAL_START_TIME, "%Y-%m-%d %H:%M:%S"), env.TOTAL_TESTCASE_PASS+env.TOTAL_TESTCASE_FAIL, env.TOTAL_TESTCASE_PASS, env.TOTAL_TESTCASE_FAIL], env.HTMLREPORT_TESTCASES, countdown=True) env.TOTAL_TESTCASE_PASS = 0 env.TOTAL_TESTCASE_FAIL = 0 env.HTMLREPORT_TESTCASES[:] = [] print ("\n")
def finish_total_test(): env.TOTAL_STOP_TIME = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") print (">>>>>> [%s] => [%s], duration [%s], case [%s], pass [%s], fail [%s] <<<<<<" % ( env.TOTAL_START_TIME, env.TOTAL_STOP_TIME, datetime.datetime.strptime(env.TOTAL_STOP_TIME, "%Y-%m-%d %H:%M:%S") - datetime.datetime.strptime(env.TOTAL_START_TIME, "%Y-%m-%d %H:%M:%S"), env.TOTAL_TESTCASE_PASS + env.TOTAL_TESTCASE_FAIL, env.TOTAL_TESTCASE_PASS, env.TOTAL_TESTCASE_FAIL, ) ) print ( ">>>>>> [%s] => [%s]" % (env.TOTAL_START_TIME, common.get_version_info()) ) htmlreport.generate_html_report([env.TOTAL_START_TIME, env.TOTAL_STOP_TIME, datetime.datetime.strptime(env.TOTAL_STOP_TIME, "%Y-%m-%d %H:%M:%S") - datetime.datetime.strptime(env.TOTAL_START_TIME, "%Y-%m-%d %H:%M:%S"), env.TOTAL_TESTCASE_PASS+env.TOTAL_TESTCASE_FAIL, env.TOTAL_TESTCASE_PASS, env.TOTAL_TESTCASE_FAIL], env.HTMLREPORT_TESTCASES, countdown=False) htmlreport.save_current_report_to_repository() htmlreport.generate_report_history() htmlreport.generate_html_report([env.TOTAL_START_TIME, env.TOTAL_STOP_TIME, datetime.datetime.strptime(env.TOTAL_STOP_TIME, "%Y-%m-%d %H:%M:%S") - datetime.datetime.strptime(env.TOTAL_START_TIME, "%Y-%m-%d %H:%M:%S"), env.TOTAL_TESTCASE_PASS+env.TOTAL_TESTCASE_FAIL, env.TOTAL_TESTCASE_PASS, env.TOTAL_TESTCASE_FAIL], env.HTMLREPORT_TESTCASES, countdown=True) env.TOTAL_TESTCASE_PASS = 0 env.TOTAL_TESTCASE_FAIL = 0 env.HTMLREPORT_TESTCASES[:] = [] print ("\n")
def html_source_version_info(): return """ <p style="text-align: center">%s</p> """ % common.get_version_info()
def html_source_version_info(): return u""" <p style="text-align: center">%s</p> """ % common.get_version_info()