增加钉钉发送测试结果

This commit is contained in:
liwanlei
2018-04-12 13:57:03 +08:00
parent 4652c7f1a9
commit 6330a2aa6c
16 changed files with 160 additions and 369 deletions

View File

@@ -1,15 +0,0 @@
# -*- 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='http接口测试报告', description='测试结果')
m=runner.run(suite)