npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pesto

v0.0.7

Published

The perfect recipe for running integration tests of AngularJS based web applications.

Downloads

10

Readme

pesto

The perfect recipe for running integration tests of AngularJS based web applications.

Ultimately, pesto is a simple API for running integration tests using Protractor and other supporting technologies.

Motivation

There's too many moving parts required to setup integration tests using Protractor and Angular:

Before Pesto:

npm install -g protractor

webdriver-manager update
webdriver-manager start

touch protractor.conf.js
vim protractor.conf.js

protractor protractor.conf.js
webdriver-manager stop

Add saucelabs to the mix and things get even crazier.

The goal of pesto is to make setting up and running integration tests as painless as possible.

After Pesto:

npm install -g pesto
touch protractor.conf.js
vim protractor.conf.js
pesto protractor.conf.js

Pesto comes loaded with the dependencies you need (plus it'll download any supporting binaries or jars you need at runtime).

Also, Pesto doesn't need to be installed globally as shown in the example above. It integrates nicely with technologies like gulpjs and grunt.

Installation

Install via npm:

npm install pesto

Usage

pesto(config)

Where config is the path to the protractor configuration file.

If config includes the sauceUser and sauceKey properties, then the SauceLabs service is used. You can also set the boolean proxy to true to enable a proxy making your local machine available to the SauceLabs virtual machine(s).

Otherwise a local Selenium server is used.

Example Configuration with SauceLabs:

exports.config = {
  sauceUser: process.env.SAUCELABS_USERNAME,
  sauceKey: process.env.SAUCELABS_ACCESS_KEY,
  proxy: true,
  specs: [ 'e2e-tests/**/*-test.js' ],
  multiCapabilities: [
    { browserName: 'firefox' },
    { browserName: 'chrome' },
    { browserName: 'internet explorer', platform: 'Windows 8', version: '10' }
  ]
};

Exampe configuration with local Selenium Server:

exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: [ 'e2e-tests/**/*-test.js' ],
  multiCapabilities: [
    { browserName: 'firefox' },
    { browserName: 'chrome' }
  ]
};

Examples

var pesto = require('pesto');
pesto('path/to/protractor.conf.js');
var pesto = require('pesto');

gulp.task('e2e-tests', function(done) {
  pesto('path/to/protractor.conf.js').then(
    function(success) {
      if(!success) {
        done('Tests failed.');
      } else {
        done();
      }
    },
    done
  );
});

You can also run pesto via the command line if installed globally (npm install -g pesto):

pesto path/to/config.js

Next Up

Pesto is most certainly in an alpha state. Immediate targets for refinement include:

  • Cleanup log output.
  • Add configurable log level and the ability to redirect logs output.
  • Configurable reporters.