nightrunner

0.1.22 • Public • Published

nightrunner

Build Status

Wrapper for Nightwatch.js.

  • Automatically downloads all the necessary binaries (selenium, phantomjs, etc)
  • Provides easy API to mock http server (expressjs with a few extensions).
  • Config-less CLI tool.

Install

npm install nightrunner -g

Usage

nr --tests="/path/to/specs" --commands="/path/to/commands" --browser="chrome"

Example

This is how a spec file looks like.

const nr = require('nightrunner');
 
module.exports = {
 
  before(browser, done) {
    browser.server = nr.server()
      .static('/', '/path/to/static')
      .listen(8080, done);
  },
 
  after(browser) {
    browser.server.close();
  },
 
  testCase() {
    browser.url('http://localhost:8080').end();
  },
 
  anotherTestCase() {
    browser.url('http://localhost:8080').end();
  }
};

Readme

Keywords

none

Package Sidebar

Install

npm i nightrunner

Weekly Downloads

49

Version

0.1.22

License

MIT

Last publish

Collaborators

  • yneves