protractor-http-snitch
v0.2.6
Published
HTTP requests sometimes fail. Protractor won't talk, let's hire a snitch.
Downloads
5
Readme
protractor-http-snitch
This Protractor plugin will print (using log4js) every failing HTTP request, and (optionally) successful HTTP requests.
Example:
[2016-08-22 14:59:16.277] [ERROR] [http-snitch] - POST /faulty/api (500)
[2016-08-22 14:59:16.278] [ERROR] [http-snitch] - Request data: {"some":"data"}
[2016-08-22 14:59:16.278] [ERROR] [http-snitch] - Response: {"some":"error"}
Installation
npm install protractor-http-snitch
Protractor config file:
config.plugins = [{
package: 'protractor-http-snitch',
// Optional options
level: {
failure: 'debug'
}
}];
And voilà!
Configuration
See the default configuration for a fully documented list of available options.