【问题标题】:Allure report generation fails with message ''allure' is not recognized as the name of a cmdlet, function..'Allure 报告生成失败,并显示消息 \'\'allure\' is not known as the name of a cmdlet, function..\'
【发布时间】:2022-10-21 10:58:46
【问题描述】:

我正在为我的 WebDriverIO mocha 测试自动化使用 Allure 报告。报告生成工作正常,但是在运行“allure generate allure-result”命令时开始显示以下错误。

allure :“allure”一词不被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名称的拼写,或者如果包含路径,请验证路径是否正确并重试。

在行:1 字符:1

  • 诱惑生成
  • CategoryInfo : ObjectNotFound: (allure:String) [], CommandNotFoundException
  • FullyQualifiedErrorId:CommandNotFoundException```

这是我的 package.json devDependencies

 "devDependencies": {
        "@wdio/allure-reporter": "^7.16.11",
        "@wdio/cli": "^7.16.13",
        "@wdio/local-runner": "^7.16.13",
        "@wdio/mocha-framework": "^7.16.13",
        "@wdio/spec-reporter": "^7.16.13",
        "chromedriver": "^97.0.2",
        "mocha-allure-reporter": "^1.4.0",
        "wdio-chromedriver-service": "^7.2.6"
    },

此失败的原因可能是什么以及如何处理?

【问题讨论】:

    标签: mocha.js webdriver-io allure reporters


    【解决方案1】:

    跑:

    npm install -g allure-commandline --save-dev
    

    为我解决了这个问题。

    参考:https://www.npmjs.com/package/allure-commandline

    谢谢

    【讨论】:

      【解决方案2】:

      我安装了命令行,并给了 哪里诱惑

      我收到空白, 之后我给了 allure serve ,并收到了同样的错误

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2022-01-21
        • 2022-08-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-31
        • 2023-02-09
        相关资源
        最近更新 更多