继续pytest单元测试框架的学习,pytest可以生成多种类型的测试报告.这一节就来学习pytest如何生成测试报告. 创建test_calss.py 测试用例文件,这里以测试该文件为例. #coding=utf-8 class TestClass: def test_one(self): x = "this" assert "h" in x def test_two(self): x = "hello" assert x == "h…
结构是 test_all.py 进行配置,执行所有测试用例集,并合并测试报告到同一个文件 #test_all.py 进行配置,执行所有测试用例集 # coding = utf-8 from time import sleep from selenium import webdriver from test01 import project as T1 from test02 import project as T2 #from test.test222 import projectClass f…