1、代码覆盖率
测试用例覆盖的百分比converage.py
pip install -U pytest-cov
生成报告
pytest --cov=src --cov-report=html
2、重复运行
pip install -U pytest-repeat
--count=5
3、并行运行测试
pip install -U pytest-xdist
pytest -v -n auto .\test.py
4、显示进度条和颜色
pip install -U pytest-sugar
参考:https://www.jianshu.com/p/3a8bc5f6cae1