You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在VS Code执行WebdriverIO测试脚本报错:找不到allure报告插件

解决WebdriverIO启动测试会话失败:找不到Allure报告器插件的问题

2022-10-06T04:58:42.199Z ERROR @wdio/local-runner: 启动测试会话失败:错误:未找到插件"allure"报告器,既不是wdio作用域包"@wdio/allure-reporter",也不是社区包"wdio-allure-reporter"。请确保已安装该插件!

解决步骤

  • 安装Allure报告器依赖
    根据使用的包管理器执行对应命令:

    • npm:
      npm install @wdio/allure-reporter --save-dev
      
    • yarn:
      yarn add @wdio/allure-reporter --dev
      

    注:新版本WebdriverIO使用@wdio/allure-reporter,旧版本可能需要安装wdio-allure-reporter,优先选择前者。

  • 检查wdio配置文件
    在wdio.conf.js或wdio.conf.ts中,确保reporters数组包含'allure'相关配置:

    exports.config = {
        // 其他配置项...
        reporters: [
            'spec',
            ['allure', {
                outputDir: 'allure-results',
                disableWebdriverStepsReporting: true,
                disableWebdriverScreenshotsReporting: false
            }]
        ],
        // 其他配置项...
    }
    
  • 重新启动测试
    依赖安装完成后,执行测试命令验证:

    npx wdio run wdio.conf.js
    

内容的提问来源于stack exchange,提问作者Dhivya N

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.17 14:20:48