This commit is contained in:
lileilei
2020-05-08 18:29:34 +08:00
parent 1aa7644c9f
commit 49e45d00fa
19 changed files with 971 additions and 29 deletions

15
run_new.py Normal file
View File

@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# @Author : leizi
from testCase.ddt_case import MyTest
import unittest,time,os
from Public import BSTestRunner
if __name__=='__main__':
suite = unittest.TestSuite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(MyTest))
now = time.strftime('%Y-%m%d', time.localtime(time.time()))
basedir = os.path.abspath(os.path.dirname(__file__))
file_dir = os.path.join(basedir, 'test_Report')
file = os.path.join(file_dir, (now + '.html'))
re_open = open(file, 'wb')
runner = BSTestRunner.BSTestRunner(stream=re_open, title='接口测试报告', description='测试结果')
runner.run(suite)