wct-test-reporter
v0.0.1
Published
Plugin to generate wct reports
Downloads
2
Readme
wct-test-reporter
Plugin to generate wct reporters
Installation
$ npm install wct-test-reporter
Usage
Basic
//wct.conf.js
module.exports = {
plugins: {
...
"test-reporter": {
reporter: "json",
output: "test_result.json"
}
...
}
};
Reporters
JSON Reporter (
reporter: 'json'
) options types:output: console
Write results to console in json formatoutput: '<filename>'
Write results to in json formatCustomized Reporter (
reporter: '<filename>'
) use a customized reporter defined at
Defining a custom reporter
let TestReporter = require('wct-test-reporter').TestReporter;
class CustomReporter extends TestReporter {
constructor(options) {
super(options);
}
onStart(context) {
}
onEnd(error) {
}
onBrowserStart(browser, sharedState, stats) {
}
onBrowserEnd(browser, sharedState, stats) {
}
onSuiteStart(browser, sharedState, stats) {
}
onSuiteEnd(browser, sharedState, stats) {
}
onTestStart(browser, testInfo, stats) {
}
onTestEnd(browser, testInfo, stats) {
}
}
module.exports = CustomReporter;