1, set up multiple run concurrently
1, the command-line installation
install pytest-xdist PIP # install the plug-in, multi-run concurrently,
# call: -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
Wrong reasons: the back of the -n value can not be negative.
Should read: positive