webdriverio: allure open command is starting the server but webpage is not loading

Viewed 501

I am trying to generate allure report by using cmd [allure generate --clean reports/allure-results]in webdriverio
Steps followed:
https://webdriver.io/docs/allure-reporter/
I am able to see allure-report folder generated

enter image description here

when I am running allure open command its showing

enter image description here

But when web browser launching , its showing error as below

enter image description here

package.json

 "keywords": [],
  "author": "",
  "license": "",
  "devDependencies": {
    "@babel/cli": "^7.6.4",
    "@babel/core": "^7.6.4",
    "@babel/preset-env": "^7.6.3",
    "@babel/register": "^7.6.2",
    "@wdio/allure-reporter": "^7.16.13",
    "@wdio/cli": "^7.16.12",
    "@wdio/cucumber-framework": "^7.16.12",
    "@wdio/local-runner": "^7.16.12",
    "@wdio/selenium-standalone-service": "^7.16.11",
    "@wdio/spec-reporter": "^7.16.11",
    "chromedriver": "^97.0.0",
    "rimraf": "^3.0.2"
  },

I hope I have provided enough details, please let me know if you need any other info

2 Answers

Double-check you have the allure-commandline package installed. Also is allure-results in your root directory or under reports/? Make sure that matches your configuration in your wdio.conf.js file.

Assuming there is not a reports/ directory, this would be your command to run to generate the report and open it: allure generate --clean allure-results && allure open allure-report

If there is a /reports directory: allure generate --clean reports/allure-results && allure open allure-report

  • Run allure command line npm install -g allure-commandline
  • Then generate report allurer-report allure generate --clean allure-results && allure open allure-report
Related