4.一些其他的特色运行
时间:2018-09-06 02:14:07
收藏:0
阅读:180
1. 可以设置当失败N个后停止测试
pytest -x 是当第一个失败产生后,停止
pytest --maxfail=2, 这里就是当失败2个用例后,停止测试
2.pytest 在命令行模式下支持多种方式运行和选择运行
- pytest test_mod.py 运行这个文件(模块)
- pytest testing/ 运行指定目录下的测试文件
3. 指定运行文件下具体类下的具体方法,用:: 分隔 文件、类、 方法
pytest test_mod.py::TestClass::test_method
原文:https://www.cnblogs.com/pingguo-softwaretesting/p/9595406.html
评论(0)