1

I am using WebDriverIO and want to generate Allure Reports. I followed all steps mentioned in Allure I did:

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

package.json has:

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

My wdio.conf.js:

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

When I do allure generate './allure-results' --clean Report successfully generated to allure-report

But when go to /allure-report folder and open index.html, its a blank page. Also there is nothing in the .allure-results folder.

Can someone help please and direct in the right direction. What am I missing?

just-boris
  • 9,468
  • 5
  • 48
  • 84
jazz
  • 11
  • 1
  • 2
  • How do you open the report? Allure requires to be opened via web-server, opening file via `file:///` protocol will not work. See the related question: http://stackoverflow.com/questions/23997449/allure-report-nothing-shown-in-chrome – just-boris May 19 '17 at 11:56

3 Answers3

1

I had the same experience with allure when combining with wdio. No matter what combination I tried via https://docs.qameta.io/allure/latest/#_commandline, I kept getting a blank html report.

I found somewhere a mention of using serve instead of generate. I used the command ./node_modules/.bin/allure serve allure-results/. and VWOLAH! (?) It worked! It runs a local server with test results and data loaded in.

Although ... it doesn't seem to grab all test data, it seems to grab the very last test that ran and only that.

1

Use the following piece of code in the wdio.conf.js

reporters: ['allure'],
reporterOptions: {
    allure: {
        outputDir: 'allure-result',
        disableWebdriverStepsReporting: true,
        disableWebdriverScreenshotsReporting: false,
        useCucumberStepReporter: false
    }
},

Command to generate allure report

node_modules/.bin//allure generate allure-results/&& node_modules/.bin/allure open
Mridul
  • 258
  • 3
  • 9
0

@jazz, try updating the version of your wdio-allure-reporter.

In my package.json, I have "wdio-allure-reporter": "^0.1.2",

tomchin23
  • 1
  • 2