Gulp plugin to run protractor tests with automatic launch and stop of the WebDriver server
$ npm install --save-dev gulp-angular-protractor
var gulp = require('gulp');
var angularProtractor = require('gulp-angular-protractor');
gulp.src(['./src/tests/*.js'])
.pipe(angularProtractor({
'configFile': 'test/protractor.config.js',
'args': ['--baseUrl', 'http://127.0.0.1:8000'],
'autoStartStopServer': true,
'debug': true
}))
.on('error', function(e) { throw e })
/*jshint node: true, camelcase: false*/
/*global require: true*/
'use strict';
var gulp = require('gulp'),
gulpProtractorAngular = require('gulp-angular-protractor');
// Setting up the test task
gulp.task('protractor', function(callback) {
gulp
.src(['example_spec.js'])
.pipe(gulpProtractorAngular({
'configFile': 'protractor.conf.js',
'debug': false,
'autoStartStopServer': true
}))
.on('error', function(e) {
console.log(e);
})
.on('end', callback);
});
Type: Boolean
Default: true
If true, the plugin will update the WebDriver, launch the WebDriver server before launching tests and stop it at the end automatically
Type: String
Default: null
The path to your protractor config
Type: Array
Default: []
Arguments get passed directly to the protractor call Read the docs for more information
Type: Boolean
Default: false
Enables Protractor's debug mode, which can be used to pause tests during execution and to view stack traces.
Type: Boolean
Default: true
Display verbosely the logs
MIT © Julien Roche