1、修改测试结果输出文件
This commit is contained in:
@@ -95,6 +95,7 @@ if __name__ == '__main__':
|
||||
while True:
|
||||
ssl = SSLBuild()
|
||||
ssl.ssl_intercept()
|
||||
with open("/root/result_self_test/result_con_traffic_inject.txt","w+") as f:
|
||||
logpath = "/root/result_self_test/con_traffic_inject/con_traffic_inject_result.log." + time.strftime("%Y-%m-%d",time.localtime())
|
||||
with open(logpath,"w+") as f:
|
||||
f.write(json.dumps(ssl.resultlist, sort_keys=True, indent=4, separators=(',', ': ')))
|
||||
time.sleep(1)
|
||||
|
||||
@@ -385,11 +385,12 @@ if __name__ == '__main__':
|
||||
suite.addTest(SslUnitTest('test_http_replace'))
|
||||
suite.addTest(SslUnitTest('test_http_hijack'))
|
||||
suite.addTest(SslUnitTest('test_http_insert'))
|
||||
with open("/root/result_self_test/unittest_result.txt","w+") as f:
|
||||
runner = unittest.TextTestRunner(stream=f,verbosity=2)
|
||||
while 1:
|
||||
while True:
|
||||
logpath = "/root/result_self_test/unittest/unittest_result.log." + time.strftime("%Y-%m-%d",time.localtime())
|
||||
with open(logpath,"w+") as f:
|
||||
runner = unittest.TextTestRunner(stream=f,verbosity=2)
|
||||
f.write("Test start time: ")
|
||||
f.write(time.asctime(time.localtime(time.time())))
|
||||
f.write("\n")
|
||||
runner.run(suite)
|
||||
time.sleep(1)
|
||||
time.sleep(1)
|
||||
|
||||
Reference in New Issue
Block a user