nwrun
Hacky runner for Nightwatch CLI
Last updated 3 years ago by pateketrueke .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install nwrun 
SYNC missed versions from official npm registry.

Build Status

Look ma', without .json files:

var argv =  require('minimist')(process.argv.slice(2)),
    nwrun = require('nwrun');

nwrun({
  argv: argv,
  force: argv.force,
  target: argv.target,
  standalone: argv.standalone,
  src_folders: process.cwd() + '/tests',
  output_folder: process.cwd() + '/reports'
}, function(success) {
  if (!success) {
    process.exit(1);
  }
});

Why?

This is just a dirty-hack based on nightwatch.initGrunt() method due compatibility issues with grunt-nightwatch itself.

Unlike other solutions we are not spawning the nightwatch process, instead, we fake its settings in runtime.

Another interesting feature is the downloading of the selenium-server-standalone*.jar file.

Is like running nightwatch but programmatically.

Since nwrun@0.2.0 the nightwatch is no longer a sub-dependency and you must install it.

If you're installing nightwatch globally ensure you run npm link nightwatch within your project to make it work locally.

API

nwrun(options, callback)

Options

  • argv — main argvs for the nightwatch instance
  • force — always force the download of the selenium jar
  • target — shortcut for specifying environments ( --env a,b)
  • standalone — if true will start selenium (will be downloaded if missing)
  • jar_url — custom endpoint for the downloading the selenium jar
  • jar_path — custom directory for saving the selenium jar locally
  • jar_version — custom version for the given jar_url, e.g. 2.45.0
  • config_path — custom path for JSON settings and options, it can be overriden per target

When done callback(success) will get executed.

If success is false means something failed.

Otherwise you're done.

All other options are passed directly to the nightwatch.runner() method.

Current Tags

  • 0.4.0                                ...           latest (3 years ago)

27 Versions

  • 0.4.0                                ...           3 years ago
  • 0.3.2                                ...           3 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.5                                ...           4 years ago
  • 0.2.4                                ...           4 years ago
  • 0.2.3                                ...           4 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           5 years ago
  • 0.0.16                                ...           5 years ago
  • 0.0.15                                ...           5 years ago
  • 0.0.14                                ...           5 years ago
  • 0.0.13                                ...           5 years ago
  • 0.0.12                                ...           5 years ago
  • 0.0.11                                ...           5 years ago
  • 0.0.10                                ...           5 years ago
  • 0.0.9                                ...           5 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (8)

Copyright 2014 - 2016 © taobao.org |