执行测试用例
# -*- coding: utf-8 -*- # @Time : 2020/2/12 22:56 # @File : run_test_16.py # @Author: Hero Liu import sys sys.path.append("h:/python_lemon") import unittest from day_20200208_mooc.base.test_class_15 import TestRequest import HTMLTestRunner suite = unittest.TestSuite() loader = unittest.TestLoader() suite.addTest(loader.loadTestsFromTestCase(TestRequest)) # runner = unittest.TextTestRunner(verbosity=2) # runner.run(suite) with open("../data/result.html", "wb") as file: runner = HTMLTestRunner.HTMLTestRunner(stream=file, title="依赖case测试", description="加油,相信一定可以看到曙光") runner.run(suite)
原文地址:https://www.cnblogs.com/come202011/p/12315076.html
时间: 2024-11-02 02:09:22