摘要: 一、Fixture用例分组运行常用于冒烟测试,分模块运行等 pytest.ini配置文件中增加分组参数markers来实现用例分组,如: markers = g1:组一 smoke:冒烟测试 pytest.ini内容如下: [pytest] addopts = -s --html=./report. 阅读全文
posted @ 2020-03-31 11:19 测试逍遥子 阅读(502) 评论(0) 推荐(0) 编辑
摘要: 一、Fixture参数之params参数可实现参数化:(可以为list和tuple,或者字典列表,字典元祖等) 实例如下: import pytest def read_yaml(): return ['1','2','3'] @pytest.fixture(params=read_yaml()) 阅读全文
posted @ 2020-03-31 11:15 测试逍遥子 阅读(242) 评论(0) 推荐(0) 编辑