pytest - 诱惑:在 linux 上找不到命令

标签 pytest allure

我正在尝试将诱惑报告生成实用程序与 py.test 框架集成。我已经使用以下命令在 linux 上安装了 allure:

$ wget https://github.com/allure-framework/allure-core/releases/download/allure-core-1.5.2/allure-commandline.tar.gz
$ tar -xvf allure-commandline.tar.gz

$ cd bin/
$ ls
allure  allure.bat

但是当我尝试运行 allure 命令时,我看到以下错误:
$ allure
allure: Command not found.

有人可以帮我解决这个问题吗?

最佳答案

运行可执行文件(具有可执行权限的任何文件);您只需通过其路径指定它:path/to/allure/bin/allure或'./诱惑'。

您也可以添加 bin文件夹到您的 PATH 变量,然后只需运行 allure .

详情请参阅以下问题:How to run a shell script on a Unix console or Mac terminal?

关于pytest - 诱惑:在 linux 上找不到命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43875741/

相关文章:

jenkins - Allure Jenkins 插件在 html 报告中生成无效链接

jenkins - 在 Jenkins 的诱惑下载中出错

webdriver-io - Allure 报告在 webdriverIO 中的 @Wdio 中清理

python - 模拟对象的构造函数仍然被调用?

python - py.test : error: unrecognized arguments: --cov-report --cov=

python - 在整个测试套件或 unittest/pytest 中的 at_exit 之后运行命令的 Hook

java - 当 b 很大时 Allure @Step(String s, byte[] b) (2.12.1 allure)

junit5 - 如何在 Allure 报告中添加屏幕截图?

python - 我们可以将条件参数传递给 pytest 中的 fixture 函数吗?

python - 如何在pytest中将自定义部分添加到终端报告