摘要: java jdk 作用:allure运行依赖java jdk,否则运行allure时会报错 下载:java_jdk_1.8.0 allure 作用:allure服务,展示测试报告 下载:allure-commandline allure-pytest 作用:python代码中调用pytest,完成测 阅读全文
posted @ 2021-12-05 11:14 漓白白" 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 参数化装饰器:@pytest.mark.parametrize("参数", 参数列表, ids=用例命名) import pytest import yaml # 单个参数 @pytest.mark.parametrize('num', [1, 2, 3, 4, 5]) def test_serch 阅读全文
posted @ 2021-12-05 02:11 漓白白" 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 总览 执行顺序 类外 setup_moudle setup_function case teardown_function teardown_moudle 类中 setup_moudle setup_class setup_method setup case teardown teardown_me 阅读全文
posted @ 2021-12-05 02:03 漓白白" 阅读(37) 评论(0) 推荐(0) 编辑
摘要: #pytest执行 选择用例 执行所有用例:pytest 包名/模块名 执行某个类用例:pytest 文件名.py类名 执行某个方法用例:pytest 文件名.py类名方法名 执行某个函数用例:pytest 文件名.py函数名 执行参数 查看帮助文档:pytest --help 打印执行详情:pyt 阅读全文
posted @ 2021-12-05 01:50 漓白白" 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 文件:test_开头、_test结尾 类名:Test 开头 方法/函数:test_开头 pytest运行时,会自动查找符合命名规范的代码,执行用例 阅读全文
posted @ 2021-12-05 01:47 漓白白" 阅读(46) 评论(0) 推荐(0) 编辑