WDIO Mochawesome Reporter
Generates test results in the json formated needed to create Mochawesome reports.
Installation
1
| npm install --save wdio-mochawesome-reporter
|
A dependency will be added to your package.json
1 2 3 4 5
| { "dependencies": { "wdio-mochawesome-reporter": "^1.0.0" } }
|
Using
Add to the list of reporters.
1 2 3 4 5 6 7 8 9 10 11
| module.exports = { reporters: ['dot', 'mochawesome'], reporterOptions: { outputDir: './', mochawesome_filename: 'myfile.json' },
};
|
Mochawesome Report Generator
To convert the json generated by this package into a Mochawesome report you will need to use the Mochawesome Report Generator.
In summary…
1) path/to/results.json
= path and name of json file
2) --reportTitle 'My Project Results
= unique report title