2017-05-18 97 views
1

我正在使用WebDriverIO并希望生成倾斜报告。我跟着Allure 提到的所有步骤,我所做的:使用WebDriverIO和Jasmine框架生成的倾斜报告

$ npm install wdio-allure-reporter --save-dev 

的package.json有:

"wdio-allure-reporter": "~0.0.2" 

我wdio.conf.js:

reporters: [allure], 
    reporterOptions: { 
     allure: { 
      outputDir: 'allure-results' 
     }   
    }, 

当我做allure generate './allure-results' --clean 报告成功生成引诱报告

但是当进入/ allure-report文件夹并打开index.html时,其空白页。在.allure-results文件夹中也没有任何内容。

有人可以帮助,并指出正确的方向。我错过了什么?

+0

如何打开报表?魅力需要通过网络服务器打开,通过'file:///'协议打开文件不起作用。 查看相关问题:http://stackoverflow.com/questions/23997449/allure-report-nothing-shown-in-chrome –

回答

1

当我与wdio结合使用时,我有着同样的魅力体验。无论我通过https://docs.qameta.io/allure/latest/#_commandline尝试什么样的组合,我都会收到空白的html报告。

我发现某处提到使用serve而不是generate。我用命令./node_modules/.bin/allure serve allure-results/.和VWOLAH! (?) 有效!它运行一个本地服务器,测试结果和数据加载英寸

虽然...它似乎并没有抓住所有的测试数据,它似乎抓住了最后一个测试,运行,只有那。

0

@jazz,请尝试更新您的wdio-aure-reporter的版本。

在我package.json,我有"wdio-allure-reporter": "^0.1.2",