MOOC(7)- case依赖、读取json配置文件进行多个接口请求-执行测试用例(16)

执行测试用例

# -*- 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)
上一篇:程序员“自制”冰墩墩


下一篇:无影云桌面使用感受