Plugin for hermione which allows to collect and provide test statistic for each of used browsers.
You can read more about hermione plugins here.
npm install stat-reporter
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.html
inside 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.json
inside current work directory.
- enabled (optional)
- flat (optional)
Also there is ability to override plugin parameters by CLI options or environment variables (see configparser).
Add plugin to your hermione
config file:
module.exports = {
// ...
plugins: {
'stat-reporter/hermione': {
enabled: true
}
},
// ...
};
Additional commands that are added to the tool for which this plugin is connected.
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
Run mocha tests:
npm run test-unit
Run tests with istanbul coverage calculation:
npm run cover
Run eslint codestyle verification
npm run lint
Special thanks to: