Light Reporter Reporter
wdio-light-reporter is a 3rd party package, for more information please see GitHub | npm
Inspired by HTML and Mochawesome reporter
!Philosphy:
This reporter does not support cucumber Report regeneration and is developed keeping in mind the bdd an mocha framework. Here,
describe()
section is considered as test scenario andit()
as testcase inside the test scenarios.
FEATURES
- Easy setup
- Enhanced UI
- Screenshot embedded in html report
- addLabel() to include steps context or name
Releases
V 0.1.9 - Initial release V 0.2.6 - (latest)
- Include multiple enviroment runs and segregate base on enviroment.
- Fix bugs
- Improved performance.
EXAMPLES
Installation
NPM
npm install wdio-light-reporter --save-dev
Configuration
reporters: ['dot', ['light',{
outputDir: './Results',
outputFile:`demo${new Date()}`, // html report file will be name this
addScreenshots: false, // to add screenshots in report make it as true. Default is false
}]
],
Screenshots
The Reporter does not have capability to automatically configure to take screenshots but however if manually configured, it listen to the event and attach the screenshots in the HTML report. To include screenshots in the report add below code in the afterTest() hook in the wdio conf file.
afterTest: async function (test,context,{ error, result, duration, passed, retries }) {
if (!passed) {await browser.takeScreenshot()}
},