2017-05-18 87 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",