appium_python-测试报告模板话化
2016-10-12 10:44
323 查看
我们用python拓展模板 HTMLTestRunner.py
python3 要自己重新改写下输出输入接口,可直接下载 改好的 地址 链接:http://pan.baidu.com/s/1hsOBw12 密码:u3pz
把下载好的 HTMLTestRunner.py 放到 python安装路径的 lib下 C:\Users\Administrator\AppData\Local\Programs\Python\Python35\Lib
执行下面:
可以用了:
python3 要自己重新改写下输出输入接口,可直接下载 改好的 地址 链接:http://pan.baidu.com/s/1hsOBw12 密码:u3pz
把下载好的 HTMLTestRunner.py 放到 python安装路径的 lib下 C:\Users\Administrator\AppData\Local\Programs\Python\Python35\Lib
执行下面:
可以用了:
# conding=utf-8 from appium import webdriver import time import sys import re import HTMLTestRunner import unittest import datetime xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx if __name__ == '__main__': suite = unittest.TestSuite() suite.addTest(Login('test_login_back')) suite.addTest(Login('test_login_set')) suite.addTest(Login('test_login_forgetpsd')) suite.addTest(Login('test_login_register')) suite.addTest(Login('test_login_phone_null')) suite.addTest(Login('test_login_phone_error1')) suite.addTest(Login('test_login_phone_error2')) suite.addTest(Login('test_login_phone_error3')) suite.addTest(Login('test_login_phone_error4')) suite.addTest(Login('test_login_phone_error5')) suite.addTest(Login('test_login_phone_right')) timestr = time.strftime('%Y%m%d%H%M%S',time.localtime(time.time())) filename = "D:\\result_" + timestr + ".html" print (filename) fp = open(filename, 'wb') runner = HTMLTestRunner.HTMLTestRunner( stream=fp, title='测试结果', description='测试报告' ) #suite = unittest.TestLoader().loadTestsFromTestCase(ContactsAndroidTests) #unittest.TextTestRunner(verbosity=2).run(suite) runner.run(suite) #g_browser.quit() fp.close() #测试报告关闭
相关文章推荐
- Appium基于python unittest自动化测试并生成html测试报告
- 移动测试之appium+python 导出报告(六)
- Appium跑python脚本自动生成简单测试结果报告
- appium+python+windows执行测试用例,并使用HTMLTestRunner输出测试报告
- 系统测试报告模板
- 测试分析报告模板
- 《Web性能测试实战》性能测试报告模板
- 《Web性能测试实战》性能测试报告模板
- 《Web性能测试实战》性能测试报告模板
- python 字典(dict)遍历的四种方法性能测试报告
- 测试报告模板
- 项目测试分析报告 模板
- python下selenium测试报告整合
- 测试报告模板
- python+selenium 生成测试报告
- 测试分析报告模板
- 《Web性能测试实战》性能测试报告模板
- 测试分析报告模板
- 《Web性能测试实战》性能测试报告模板
- 测试报告模板