python pytest 重复执行

python pytest 重复执行整个脚本

1.安装插件 pip install pytest-repeat

2.保证脚本中不能import自己编写的包

3.切换到py路径下:cd D:\code\htng_api\oxi\rate\derby

4.重复执行整个脚本:pytest -sv --count=2 -x --repeat-scope=session rate_create.py
–count=2重复执行两次
–repeat-scope=session 重复执行的范围,整个py脚本
-x 遇到错误,停止运行


版权声明:本文为weixin_45016484原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。