'allure' is not an internal or external command, nor an executable program or batch file

'allure' is not an internal or external command, nor an executable program or batch file. Possible reasons and checkpoints:

The first step is to install Python dependency libraries. Choose one of the two ways, the first is in the dos window, enter the following three commands:

pip3 install pytest

pip3 install allure-python

pip3 install allure-python-commons

The second method is to open Pycharm, click File, click Settings, select project interpreter, click the + plus sign button in the upper right corner, search and select pytest, click install package; search for allure, select allure-python and allure-python-commons respectively, Click install package. As shown below.

The second step, after installing the dependent library, download and decompress the allure command line tool, which is used to execute the allure command in the following steps, download address one: https://pan.baidu.com/s/1YkgYpvfmH_I26ZPAJ1OF0A; download address two: https: //github.com/allure-framework/allure-pytest. Set the decompressed allure folder as an environment variable. Add allure to the environment variable PATH (\installation path\allure-commandline\bin).

The third step is to confirm that the allure installation is successful, and enter: allure --version on the command line to display the allure installation version 2.12.1. If an error is reported, it may be caused by the fact that jdk1.8 is not installed in the computer. At this time, just install a jdk1.8.

Remember to restart the IDE after configuring the environment variables

Guess you like

Origin blog.csdn.net/weixin_42760923/article/details/114439831