stat-reporter
Plugin for hermione which allows to collect and provide test statistic for each of used browsers.
You can read more about hermione plugins here.
Installation
npm install stat-reporterUsage
Plugin has following configuration:
- enabled (optional)
Boolean– enable/disable the plugin; by default plugin is enabled - reporters (optional)
Object- the list of statistic reporters- flat (optional)
Object- flat (console) reporter configuration- enabled (optional)
Boolean- enable/disable the flat reporter; by default reporter is enabled
- enabled (optional)
- html (optional)
Object- html reporter configuration- enabled (optional)
Boolean- enable/disable the html reporter; by default reporter is disabled - path (optional)
String- path for saving html report file; by default html report will be saved intostat-reporter.htmlinside current work directory.
- enabled (optional)
- json (optional)
Object- json reporter configuration- enabled (optional)
Boolean- enable/disable the json reporter; by default reporter is disabled - path (optional)
String- path for saving json report file; by default json report will be saved intostat-reporter.jsoninside current work directory.
- enabled (optional)
- flat (optional)
Also there is ability to override plugin parameters by CLI options or environment variables (see configparser).
Hermione usage
Add plugin to your hermione config file:
module.exports = {
// ...
plugins: {
'stat-reporter/hermione': {
enabled: true
}
},
// ...
};Additional commands
Additional commands that are added to the tool for which this plugin is connected.
merge-stat-reports
Command that adds ability to merge reports which are created after running the tests.
Attention! This plugin works only for Hermione
Example of usage:
npx hermione merge-stat-reports src-report-1.json src-report-2.json --html dest-html-report --json report.json
Testing
Run mocha tests:
npm run test-unitRun tests with istanbul coverage calculation:
npm run coverRun eslint codestyle verification
npm run lintSpecial thanks to: