"""
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 re
unittest 写报告就靠 HTMLTestRunnerNew.py
最新推荐文章于 2024-02-28 13:40:23 发布
本文介绍如何利用HTMLTestRunnerNew.py模块,为Python的unittest测试框架生成详细的HTML格式测试报告,便于查看和分析测试结果。
摘要由CSDN通过智能技术生成