美文网首页
pytest (一):指定运行测试用例

pytest (一):指定运行测试用例

作者: sai德很黑 | 来源:发表于2021-06-15 16:17 被阅读0次

pytest命令行指定运行测试用例

目录如下:



test_dome_1.py
1、指定文件夹运行
pytest dome/
2、指定模块运行
pytest test_dome_1.py
3、指定测试用例
pytest test_dome_1.py::test_one
4、模糊匹配
pytest -k "one"
#含有“one”文件名、类名、方法名都会被找到执行
5、标记(-m)
pytest.mark
pytest -m dome
#运行所有文件下被标记了dome的用例

学习ing。。。


相关文章

网友评论

      本文标题:pytest (一):指定运行测试用例

      本文链接:https://www.haomeiwen.com/subject/ajffyltx.html