0

I am getting blank report with NaN%, screenshot attached in CodeceptJs.

--- codecept.config.js ---
plugins: {
wdio: {
enabled: true,
services: ['selenium-standalone']
},
allure: {
enabled: true,
outputDir: "./output"
},
screenshotOnFail: {
enabled: true
},
stepByStepReport: {
enabled: true,
output: "./output"
},
},
reporters: [['allure', {
outputDir: 'allure-results',
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: true,
}]],
------ package.json ----
"test:acceptance:report": "./node_modules/.bin/allure serve test/acceptance/report",
"devDependencies": {
"allure-commandline": "^2.13.0",
}

I tried ...
1- reinstalling npm
2- installing allure-commandline (npm install -g allure-commandline --save-dev)
3- Run via allure generate and allure generate --clean

Commands: allure generate --clean
Result: allure-results does not exists
Report successfully generated to allure-report

Command: npm install -g allure-commandline --save-dev
Result : 

C:\Users\XXXXX\AppData\Roaming\npm\allure -> C:\Users\XXXXXX\AppData\Roaming\npm\node_modules\allure-commandline\bin\allure

allure-commandline@2.13.0 added 1 package in 2.304s[enter image description here][1]


  [1]: https://i.stack.imgur.com/w8PnZ.png
Sanjay
  • 1

3 Answers3

0

We usually get this error in codeceptjs when the exeuction is done is parallel.A seperate chunk subfolder is created inside the output folder and all the execution details are stored inside the individual subfolder.

allure generate --clean command search for the execution files inside the output folder, but does not consider the subfolder.

You can try to move all the files from the subfolder within the output folder and save it to another folder(eg finaloutput) at the root location of the project and then run the below command

allure generate finaloutput --clean

0

Set the outputDir in allure plugin as allure-results

  plugins: {
   ...
    allure: {
      enabled: true,
      outputDir: "allure-results"
    }
  }

To generate allure report use command: allure serve

Background: I ran into this issue while trying to run tests in parallel. The output folder held each report in a separate sub-folder. By setting outputDir to allure-results all the reports are placed in the allure-results folder (no sub-folders are created).

0

If you get NaN% that means your report couldn't be generated to allure-results. Looks like allure-results folder doesn't exist on your machine.

Try to generate allure report from ./output folder in your case.

allure serve ./output 
Mario Petrovic
  • 7,500
  • 14
  • 42
  • 62