Gulp-Protractor and Gulp-Angular-Protractor can pass args and a config file to protractor.
So why do I need to pass a list of files to gulp?
function runProtractor(done) {
var params = process.argv;
var args = params.length > 3 ? [params[3], params[4]] : [];
gutil.log('arguments: ' + args);
gulp.src(paths.e2eFiles)
.pipe(protractor({
configFile: 'protractor.local.conf.js',
args: args,
'autoStartStopServer': true,
'debug': true
}))
.on('error', function (err) {
gutil.log(gutil.colors.red("An error occurred in protractor. Did you start the webdriver?"));
gutil.log(gutil.colors.red("Run cmd 'start gulp webdriver'."));
gutil.log(gutil.colors.red('error: ' + err));
// Make sure failed tests cause gulp to exit non-zero
throw err;
})
.on('end', function () {
// Close browser sync server
browserSync.exit();
done();
});
} The problem is that protractor are not running the suites but the files in src. Is there a way to call protractor direct?