Commit d87065de by zhaihuitao

update

parent a7ba3814
# -*- coding: utf-8 -*-
"""
@author:zhaiht
@file: __init__.py.py
@time: 2020/11/2 11:25
@desc:
"""
\ No newline at end of file
......@@ -7,15 +7,54 @@
"""
import unittest
import os, sys
import os
import HTMLTestReportCN
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)
if __name__ == '__main__':
case_path = os.path.join(os.getcwd())
report_path = r"/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/report/result.html"
def all_case():
discover = unittest.defaultTestLoader.discover(case_path, "test*.py")
print(discover)
return discover
if __name__ == "__main__":
fp = open(report_path, 'wb')
runner = HTMLTestReportCN.HTMLTestRunner(
stream=fp,
title='<TKIO接口监控报告>',
description=u'TKIO接口自动化测试用例',
tester=u"翟会涛"
)
runner.run(all_case())
fp.close()
'''if __name__ == "__main__":
case_path = os.path.join(os.getcwd(), "testcase")
report_path = r"/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/report/result.html"
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)
base_path = os.path.dirname(os.path.abspath(__file__))
testdir = os.path.join(base_path, 'android_events')
discover = unittest.defaultTestLoader.discover(testdir, 'test*.py')
runner = unittest.TextTestRunner(verbosity=2)
runner.run(discover)
\ No newline at end of file
def all_case():
discover = unittest.defaultTestLoader.discover(testdir, 'test*.py')
runner = unittest.TextTestRunner(verbosity=2)
runner.run(discover)
fp = open(report_path, 'wb')
runner = HTMLTestRunnerCN.HTMLTestRunner(
stream=fp,
verbosity=1,
title='<订单自动化测试报告>',
description=u'订单P0接口自动化测试用例',
# tester=u"tester"
)
runner.run(all_case())'''
# fp.close()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment