2020-05-08 18:29:34 +08:00
|
|
|
# encoding: utf-8
|
|
|
|
|
"""
|
|
|
|
|
@author: lileilei
|
|
|
|
|
@file: create_report.py
|
|
|
|
|
@time: 2017/8/3 12:27
|
|
|
|
|
"""
|
2020-05-09 21:24:18 +08:00
|
|
|
from Public.log import LOG, logger
|
|
|
|
|
|
|
|
|
|
|
2020-05-08 18:29:34 +08:00
|
|
|
@logger('保存测试结果')
|
2020-05-09 21:24:18 +08:00
|
|
|
def save_result(testtime, toial, passnum, fail):
|
2020-05-08 18:29:34 +08:00
|
|
|
try:
|
2020-05-09 21:24:18 +08:00
|
|
|
f = open('result.txt', 'a')
|
|
|
|
|
f.write("%s=%s=%s=%s \n" % (testtime, toial, passnum, fail))
|
2020-05-08 18:29:34 +08:00
|
|
|
f.close()
|
|
|
|
|
except:
|
2020-05-09 21:24:18 +08:00
|
|
|
LOG.info('保存测试结果出错,原因:%s' % Exception)
|
2020-05-08 18:29:34 +08:00
|
|
|
print('记录测试结果失败')
|