摘要: fixture 使用介绍: @pytest.fixture() #加fixture装饰器,可以让这个方法后面被调用 def login(): print("\nlogin.....\n") def test_search(): print("search") def test_order(login 阅读全文
posted @ 2022-05-13 18:44 lms21 阅读(212) 评论(0) 推荐(0)
摘要: 生成测试报告流程 使用 Allure2 生成精美报告 这两个方法都开启了tomcat服务,随着服务关闭就会关闭。如果需要一个长时间的存在,就需要部署服务器,后续可以和Jenkins一起用。 命令格式:allure [option] [command] [command options] 在测试执行期 阅读全文
posted @ 2022-05-13 16:52 lms21 阅读(287) 评论(0) 推荐(0)
摘要: 加文本 allure.attach("这是一段文本信息",name="文本显示") 加截图 @allure.feature("搜索模块") class TestSearch(): @allure.story("搜索成功") @allure.title("搜索用例1") def test_case_1 阅读全文
posted @ 2022-05-13 16:42 lms21 阅读(187) 评论(0) 推荐(0)
摘要: 学习网站: https://docs.qameta.io/allure/#_pytest Feature & Story & step &Title的用法: 运行: pytest test_demo.py --alluredir ./result //py文件为运行文件 result为放报告的地址 阅读全文
posted @ 2022-05-13 16:04 lms21 阅读(64) 评论(0) 推荐(0)