Run the allure serve command and report an error: xxx does not exist

Running the allure serve command, I kept reporting an error: xxx does not exist (the xxx file does not exist), reinstalled allure, tried various methods, and after a day of tossing, I finally found that the path at runtime was wrong. It was really carelessness that killed people!

1. In the main.py file, configure the test report path

2. Execute main.py, and the json file related to the test report will be generated in the current path

3. Execute allure serve temp, at this time you can see the error message in the log: temp does not exist, and the test report is blank

4. Check the path of running the allure serve command and find that it is inconsistent with the path saved in the test report

5. Use the cd command to enter the path where the test report is saved

6. Execute allure serve temp again, the log does not report an error, and the test report also shows the content

 

 

Guess you like

Origin blog.csdn.net/m0_37794269/article/details/125285801
Recommended