json-reporter
v3.2.1
Published
Common plugin for testplane and hermione which is intended to aggregate the results of tests running
Readme
json-reporter
Common plugin for:
which is intended to aggregate the results of tests running.
You can read more about testplane plugins here.
Installation
npm install json-reporterUsage
Plugin has following configuration:
- enabled (optional)
Boolean– enable/disable the plugin; by default plugin is enabled - path (optional)
String- path for saving json report file; by default json report will be saved intojson-reporter.jsoninside current work directory. - includeHistory (optional)
Boolean– include test execution history in the json report; by default history is not included. Note: history is not available for skipped tests and may be undefined.
Also there is ability to override plugin parameters by CLI options or environment variables (see configparser).
Testplane usage
Add plugin to your testplane config file:
export default {
// ...
plugins: {
'json-reporter/testplane': {
enabled: true,
path: 'my/custom/report.json',
includeHistory: true
}
},
//...
}Hermione usage
Add plugin to your hermione config file:
module.exports = {
// ...
plugins: {
'json-reporter/hermione': {
enabled: true,
path: 'my/custom/report.json',
includeHistory: true
}
},
//...
}Testing
Run mocha tests:
npm run test-unitRun tests with istanbul coverage calculation:
npm run coverRun eslint codestyle verification
npm run lint