输入命令:
pytest test_ceshiren.py --alluredir=./report
报错:
Fatal error in launcher: Unable to create process using '"F:\Python\Python
38\python.exe" "F:\Tools\Python\Python38\Scripts\pytest.exe" test_ceshiren.py --alluredir=./report': ???????????
猜测是pytest有问题,查看pytest,发现果然报错:
> pytest --version
Fatal error in launcher: Unable to create process using '"F:\Python\Python
38\python.exe" "F:\Tools\Python\Python38\Scripts\pytest.exe" --version': ???????????
然后重新安装pytest,再查看pytest,成功
> pytest --version
pytest 7.2.2
后面执行pytest命令,再执行allure serve report/(记得提前pip install allure-pytest,先前就这里出错了),成功获得报告。