forked from liwanlei/jiekou-python3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_html.py
19 lines (18 loc) · 998 Bytes
/
main_html.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- coding: utf-8 -*-
# @Author : leizi
import unittest,os,datetime
from testCase.test_case import Testinface
from Public.py_Html import createHtml
from Public.emmail import sendemali
if __name__ == '__main__':
starttime=datetime.datetime.now()
suite = unittest.TestSuite()
suite.addTest(Testinface("testinterface"))
me=Testinface()
list_fail, list_pass, list_json, listurls, listkeys, listconeents, listfangshis, listqiwangs, listids, listrelust, listnames=me.testinterface()
filepath =r'C:\Users\Administrator\Desktop\jiejko\test_Report\relult.html'
if os.path.exists(filepath) is False:
os.system(r'touch %s' % filepath)
endtime=datetime.datetime.now()
createHtml(titles='接口测试报告',filepath=filepath,starttime=starttime,endtime=endtime,passge=list_pass,fail=list_fail,id=listids,name=listnames,key=listkeys,coneent=listconeents,url=listurls,meth=listfangshis,yuqi=listqiwangs,json=list_json,relusts=listrelust)
sendemali(filepath)