随笔分类 -  pytest

pytest知识点随记
pytest 获取测试用例的markers
摘要:python自动化测试脚本中,测试用例被不同的marker name装饰,那么如果获取这些marker name呢? 1.测试文件: tests/ --conftest.py --test_demo.py 2.代码实现 test_demo.py import pytest class TestDem 阅读全文
posted @ 2023-01-10 20:46 ananmy 阅读(392) 评论(0) 推荐(0) 编辑
内置fixture --request的用法(pytest_addoption 注册、pytestconfig 获取命令行参数 )
摘要:pytest_addoption 注册、pytestconfig 获取命令行参数 : pytest_addoption 可以让用户注册一个自定义的命令行参数,方便用户将数据传递给 pytest; 这个 Hook 方法一般和 内置 fixture pytestconfig 配合使用,pytest_ad 阅读全文
posted @ 2021-02-23 17:46 ananmy 阅读(126) 评论(0) 推荐(0) 编辑

 
点击右上角即可分享
微信分享提示