Code Monkey home page Code Monkey logo

gulp-angular-protractor's Introduction

gulp-angular-protractor

Build StatusDependency Status devDependency Status

NPM NPM

Gulp plugin to run protractor tests with automatic launch and stop of the WebDriver server

Install

$ npm install --save-dev gulp-angular-protractor

Usage

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 })

Full example

/*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);
});

API

angularProtractor(options)

options

options.autoStartStopServer

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

options.configFile

Type: String Default: null

The path to your protractor config

options.args

Type: Array Default: []

Arguments get passed directly to the protractor call Read the docs for more information

options.debug

Type: Boolean Default: false

Enables Protractor's debug mode, which can be used to pause tests during execution and to view stack traces.

options.verbose

Type: Boolean Default: true

options.webDriverUpdate

Type: Object Default: undefined

options.webDriverUpdate.browsers

Type: Array Default: ['chrome']

List of browsers to update the webdriver

options.webDriverUpdate.args

Type: Array Default: []

Additional arguments to pass for the update of the webdriver

options.webDriverStart

Type: Object Default: undefined

options.webDriverStart.args

Type: Array Default: []

Additional arguments to pass for the start of the webdriver

License

MIT © Julien Roche

gulp-angular-protractor's People

Contributors

rochejul avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.