资源简介
Python+Selenium自动化测试优化后的HTMLTestRunner测试报告
代码片段和文件信息
# coding=utf-8
“““
A TestRunner for use with the Python unit testing framework. It
generates a HTML report to show the result at a glance.
The simplest way to use this is to invoke its main method. E.g.
import unittest
import HTMLTestRunner
... define your tests ...
if __name__ == ‘__main__‘:
HTMLTestRunner.main()
For more customization options instantiates a HTMLTestRunner object.
HTMLTestRunner is a counterpart to unittest‘s TextTestRunner. E.g.
# output to a file
fp = file(‘my_report.html‘ ‘wb‘)
runner = HTMLTestRunner.HTMLTestRunner(
stream=fp
title=‘My unit test‘
description=‘This demonstrates the report output by HTMLTestRunner.‘
)
# Use an external stylesheet.
# Se
- 上一篇:百度api语音识别代码
- 下一篇:Python实现文件浏览器
相关资源
- python一个打砖块的小游戏
- python实验指导书 图文高清版
- python主动安装第三方库
- python爬取豆瓣top250电影信息
- python绘制 大蟒蛇
- python小程序(数组排序)
- Python去水印(基于cv2)
- Python 数据结构入门 - 二叉搜索树(
- python空心电感计算器
- python除法.docx
- 抽奖背后的秘密(python抽奖逻辑)
- 绘制统计学直方图茎叶图(matplotlib)
- python求解标准差
- python数据分析与处理
- 利用Python将照片在Excel中利用点阵图显
- python turtle 跳房子
- python 人群计数
- 自动化测试(基于pytest)
- Python调用第三方API换脸
- “去哪儿吃”帮你选餐厅(python代码
- python 控制台登陆密码验证
- KNN算法的Python实现(datingrecd.ipynb)
- python核心编程第二版-习题答案
- python爬取笔趣阁小说
- Python程序设计基础试题以及答案(3
- python聊天-服务端与客户端
- python递归求最大公约数
- 用python画皮卡丘(基于turtle)
- 伟哥的python私房菜(中国程序员).
- pip一键升级(python脚本)
评论
共有 条评论