Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 1.21 KB

chapter_04.md

File metadata and controls

17 lines (12 loc) · 1.21 KB

Use of Reporter and Services

Congratulation for successfully creating your first WebdriverIO test suite. Now as we move forward we want to make use of the diverse WebdriverIO ecosystem and add some more reporters and services to our test suite. The objectives are:

  1. Add the Allure reporter to the list of reporters
  2. Use the Allure CLI to generate the Allure report in the onComplete hook

Another very popular plugin is the @wdio/allure-reporter which is a reporter that generates .xml files that can be converted into an HTML page. The reporter itself just creates a bunch of .json files. In order to generate an html page you need to use Allure command line tool. To integrate the CLI and auto-generate the html page, please checkout the Allure Reporter docs.

If you setup all the things successfully you should see an allure-report directory with a bunch of static files in there which you can serve via:

$ cd ./allure-report
$ npm i -g http-server
$ http-server -p 8080
$ open http://127.0.0.1:8080