网络科技公司注册,网站优化外包费用,导航主题wordpress,个人主页网站开发背景#测试套件层级
allure.feature(测试PecExplorer)
#重试次数#xff0c;粒度为用例#xff0c;建议用例设计可重复性高
pytest.mark.flaky(reruns3)
class TestPecExplorer:#功能模块层级allure.story(登录界面)#测试用例层级allure.title(Test…#测试套件层级
allure.feature(测试PecExplorer)
#重试次数粒度为用例建议用例设计可重复性高
pytest.mark.flaky(reruns3)
class TestPecExplorer:#功能模块层级allure.story(登录界面)#测试用例层级allure.title(Test Case: TestPecExplorer)allure.description(Transmit)def test_PecView(self, setup_driver):with allure.step(断言):assert 1 1
if __name__ __main__:pytest.main([-s, -v,PecExplorerCase.py])-q: 安静模式, 不输出环境信息-v: 丰富信息模式, 输出更详细的用例执行信息-s: 显示程序中的print/logging输出# 释放服务的端口号port_to_release 5003release_port(port_to_release)# 结束进程process_kill(cmd.exe)# 生成测试报告time.sleep(3)os.system(allure generate ./temps -o ./reports --clean)time.sleep(3)# 开启测试报告服务设置IP、端口号os.system(rstart allure open -h 192.168.169.131 -p 5003 ./reports)函数process_kill()、release_port()见另一篇文章常用函数utils 添加附件的详细内容可见向Allure测试报告添加附件
测试报告展示