Socket
Socket
Sign inDemoInstall

wt-protractor-runner

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wt-protractor-runner

Gulp (or anywhere else) protractor runner task


Version published
Maintainers
1
Created
Source

wt-protractor-runner

What's that for?

This module is here to help you with two things:

  • Run protractor from gulp with just one line of code.
  • Run a bunch or protractor instances sequentially for local cross-browser testing or using cloud platforms like Browserstack.

Run protractor

As you may know, there's already gulp-protractor that allows you to use a gulp plugin in order to run protractor. Its readme also shows how to run protractor without a gulp plugin but it needs some copy/pasting. wt-protractor-runner will help you avoid this code duplication and run your tests in few seconds.

Install wt-protractor-runner

Gulpfile.js:

 var protractorRunner = require('wt-protractor-runner');
 
 gulp.task('test-e2e', protractorRunner({
     configList: [
         {
             capabilites: {
                 browser: 'chrome'
             },
             specs: __dirname + '/test/e2e/*.js'
         }
     ]
 }));

Run:

 gulp test-e2e

Run cross-browser tests with protractor.

Just do the same as above and give multiple configurations to protractor.

 
 var protractorRunner = require('wt-protractor-runner');
 var specPattern = __dirname + '/test/e2e/*.js';
 
 gulp.task('test-e2e', protractorRunner({
     configList: [
         /* Chrome. */
         {
             capabilites: {
                 browser: 'chrome'
             },
             specs: specPattern
         },
         /* Safari on browserstack. */
         {
              capabilities: {
                  acceptSslCerts: true,
                  browserName: 'safari',
                  'browserstack.debug': true,
                  'browserstack.user': process.env.YOUR_BROWSERSTACK_USER_ENV_VAR,
                  'browserstack.key': process.env.YOUR_BROWSERSTACK_KEY_ENV_VAR,
                  os: 'OS X',
                  os_version: 'Yosemite'
              },
              seleniumAddress: 'http://hub.browserstack.com/wd/hub'
              specs: specPattern
         }
     ]
 }));

To make this more readable, you should use wt-protractor-utils.

Without gulp.

 protractorRunner({configList: ...})(callback);

Keywords

FAQs

Package last updated on 28 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc