python 报告使用html
参见:http://blog.csdn.net/ddaowz/article/details/8181701
使用 HTMLTestRunner
download add:http://tungwaiyip.info/software/HTMLTestRunner.html
test 了一下可以将print内容直接打印到html中了。
[next]
1.对中文的支持,
2.java使用
-------------------------coding----------------------------------
参见:http://blog.csdn.net/ddaowz/article/details/8181701
使用 HTMLTestRunner
download add:http://tungwaiyip.info/software/HTMLTestRunner.html
test 了一下可以将print内容直接打印到html中了。
[next]
1.对中文的支持,
2.java使用
-------------------------coding----------------------------------
from selenium import webdriver
import unittest
import time
import HTMLTestRunner
class test_class(unittest.TestCase):
def setUp(self):
self.verificationErrors=[]
self.test=webdriver.Ie()
self.url=" http://192.168.0.39 "
def test_login(self):
...........................
.............................
if __name__=="__main__":
testsuite=unittest.TestSuite()
testsuite.addTest(ShangpLogin("test_shangp_login"))
filename="e:\\result.html"
fp=file(filename,'wb')
runner=HTMLTestRunner.HTMLTestRunner(stream=fp,title='Result',description='Test_Report')
runner.run(testsuite)
没有评论:
发表评论