摘要:
并行测试 多cpu并行执行用例,直接加个-n参数即可,后面num参数就是并行数量,比如num设置为3: pytest -n 3 使用pytest-xdist插件也能生成html报告,完美支持pytest-html插件 pytest -n 3 --html=report.html --self-con 阅读全文
摘要:
pytest -h 命令行输入pytest -h,找到里面两个命令行参数: --lf 和 --ff --lf, --last-failed 只重新运行上次运行失败的用例(或如果没有失败的话会全部跑) --ff, --failed-first 运行所有测试,但首先运行上次运行失败的测试(这可能会重新测 阅读全文
摘要:
使用pip安装pytest-repeat pip install pytest -repeat 重复执行--count 命令行执行:pytest baidu/test_1_baidu.py -s --count=5 文件中写参数执行 在代码中标记要重复多次的测试 @pytest.mark.repea 阅读全文