1、设置多并发运行

1、命令行安装

pip install pytest-xdist  #安装插件,进行多并发运行,
#调用:-n -5

 

import pytest


#
pytest.main(["-n","-3",
             #,"--reruns","2","--reruns-delay","3",
              "--html=test_result/report/report.html", "--junitxml=test_result/report/report.xml"
             #,"--alluredir=test_result/allureReports"
            ])

执行结果:ERROR: MISSING test execution (tx) nodes: please specify --tx

出错原因:-n后面的值不能为负值。

应改为:正数

相关文章:

  • 2020-10-23
  • 2022-02-16
  • 2021-10-20
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-10
  • 2021-11-14
相关资源
相似解决方案