ovh-protractor-jasmine2-logs-reporter
v0.0.1
Published
Logs reporter for Protractor and Jasmine2
Downloads
4
Maintainers
Keywords
Readme
OVH Logs Reporter
Angular logs reporter for Protractor and Jasmine2.
It creates a JSON report file with all logs informations (console and HTTP errors (only chrome)).
Install
NPM
$ npm install ovh-protractor-jasmine2-logs-reporter --save
Get the sources
$ git clone https://github.com/ovh-ux/ovh-protractor-jasmine2-logs-reporter.git
$ cd ovh-protractor-jasmine2-logs-reporter
$ npm install
$ bower install
Usage
Into your protractor.conf.js:
plugins : [{
path: "node_modules/ovh-protractor-jasmine2-logs-reporter/plugin.js"
}],
onPrepare: function () {
// add logs reporter
var OvhLogsReporter = require("ovh-protractor-jasmine2-logs-reporter");
jasmine.getEnv().addReporter(new OvhLogsReporter({
baseDirectory: "./reports", // The directory to store the file
fileName: "report.json", // (Optional) The report file
enableHttpLogs: true // CHROME ONLY: log HTTP errors
}));
},
(CHROME ONLY) It can logs HTTP errors too (> HTTPCODE 200).
In addition of above code, add this in your protractor.conf.js:
capabilities: {
"browserName": "chrome",
"chromeOptions": { "args": ["incognito", "disable-extensions"] },
"loggingPrefs": {
"browser": "ALL",
"performance": "ALL"
},
"perfLoggingPrefs": {
"enableNetwork": true,
"enablePage": false,
"enableTimeline": false
}
},
plugins : [{
path: "node_modules/ovh-protractor-jasmine2-logs-reporter/plugin.js"
}],
onPrepare: function () {
// add logs reporter
var OvhLogsReporter = require("ovh-protractor-jasmine2-logs-reporter");
jasmine.getEnv().addReporter(new OvhLogsReporter({
baseDirectory: "./reports", // The directory to store the file
fileName: "report.json", // (Optional) The report file
enableHttpLogs: true // CHROME ONLY: log HTTP errors
}));
},
Contributing
You've developed a new cool feature ? Fixed an annoying bug ? We'd be happy to hear from you !
Have a look in CONTRIBUTING.md
Run the tests
$ npm test
Related links
- Contribute: https://github.com/ovh-ux/ovh-protractor-jasmine2-logs-reporter/blob/master/CONTRIBUTING.md
- Report bugs: https://github.com/ovh-ux/ovh-protractor-jasmine2-logs-reporter/issues
- Get latest version: https://github.com/ovh-ux/ovh-protractor-jasmine2-logs-reporter
License
See https://github.com/ovh-ux/ovh-protractor-jasmine2-logs-reporter/blob/master/LICENSE