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

meteor-storm

v0.6.2

Published

WebDriver E2E test wrapper for Meteor.

Downloads

16

Readme

MeteorStorm Build Status

MeteorStorm is an end to end test framework for Meteor applications built on top of Protractor and WebDriverJS. MeteorStorm runs tests against your application running in a real browser, interacting with it as a user would.

MeteorStorm can be run as a standalone binary, or included into your tests as a library. Use MeteorStorm as a library if you would like to manage WebDriver and your test setup yourself.

To run the sample tests

Install MeteorStorm with:

npm install -g meteor-storm

Start up a selenium server (See the appendix below for help with this). By default, the tests expect the selenium server to be running at http://localhost:4444/wd/hub.

The node module's example folder contains a simple test suite which runs against meteor.com. Run with:

storm example/conf.js

Using the MeteorStorm Runner

The MeteorStorm runner is a binary which accepts a config file. Install storm with:

npm install -g meteor-storm
# Run the line below to see command line options
storm

You will need a configuration file containing setup info and test files containing the actual test scripts. The config file specifies how the runner should start webdriver, where your test files are, and global setup options. The test files use Jasmine framework by default but can also use Mocha or Cucumber.

Create a configuration file - an example with detailed comments is shown in node_modules/meteor-storm/referenceConf.js. Edit the configuration file to point to your test files.

// myConf.js
exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: ['myTest.js', 'myTestFolder/*Test.js']
}

The configuration file must specify a way to connection to WebDriver. This can be

  • seleniumAddress: The address of a running Selenium standalone server.
  • seleniumServerJar: The location of the Selenium standalone .jar file on your machine. MeteorStorm will use this to start up the selenium server.
  • sauceUser and sauceKey: The username and key for a SauceLabs account. MeteorStorm will use this to run tests on SauceLabs.

The runner exposes global variables browser, by and element. Check out the specs folder to learn how to write a test.

// myTest.js
describe('Meteor homepage', function() {
  it('should greet the named user', function() {
    browser.get('http://www.meteor.com/');

    element(by.model('yourName')).sendKeys('James');

    var greeting = element(by.binding('yourName'));

    expect(greeting.getText()).toEqual('Hello James!');
  });
});

Run with:

storm myConf.js

Cloning and running MeteorStorm's own tests

Clone the github repository.

git clone https://github.com/JamesMGreene/meteor-storm.git
cd meteor-storm
npm install

Start up a selenium server. By default, the tests expect the selenium server to be running at http://localhost:4444/wd/hub.

MeteorStorm's test suite runs against the included testapp. Start that up with:

cd testapp
./scripts/web-server.js

Then run the tests with:

npm test

Appendix A: Setting up a standalone Selenium server

WebdriverJS does not natively include the selenium server - you must start a standalone selenium server. All you need is the latest selenium-server-standalone.. To drive individual browsers, you may need to install separate driver binaries.

To use with chrome browsers, download chromedriver. More information about chromedriver

The wdmgr (webdriver-manager) script is included in the npm package to manage downloads for you. To see the options, run:

npm install -g storm
wdmgr

Download and start the selenium server with:

wdmgr update
wdmgr start

Note the Java Development Kit (JDK) is also required to run the webdriver. You may have to download and install it if your computer does not already have it.

For alternate ways to download and start the selenium standalone, see the webdriver docs.