How to use the nightwatch.CliRunner function in nightwatch

To help you get started, we’ve selected a few nightwatch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vuejs / vue-router / test / e2e / runner.js View on Github external
Nightwatch.cli(argv => {
        adaptArgv(argv)
        Nightwatch.CliRunner(argv)
          .setup(null, () => {
            // NOTE: I don't know when this is running or if it does
            // Code to stop browserstack local after end of parallel test
            bsLocal.stop(() => {
              server && server.close()
              process.exit(0)
            })
          })
          .runTests()
          .then(() => {
            // Code to stop browserstack local after end of single test
            bsLocal.stop(() => {
              server && server.close()
              process.exit(0)
            })
          })
github luniehq / lunie / tests / e2e / browserstack.runner.js View on Github external
Nightwatch.cli(function(argv) {
        Nightwatch.CliRunner(argv)
          .setup(null, function() {
            // Code to stop browserstack local after end of parallel test
            bs_local.stop(function() {})
          })
          .runTests(function() {
            // Code to stop browserstack local after end of single test
            bs_local.stop(function() {})
          })
      })
    }
github appnexus / lucid / scripts / local.runner.js View on Github external
Nightwatch.cli(argv => {

					console.log('run tests');
					Nightwatch.CliRunner(argv)
					// Code to stop browserstack local after end of parallel test
					.setup(null, () => {
						local.stop(() => {
							server.close()
							process.exit(0);
						});
					})
					.runTests(() => {
						// Code to stop browserstack local after end of single test
						local.stop(() => {
							server.close()
							process.exit(0);
						});
					});

				});
github browserstack / nightwatch-browserstack / scripts / local.runner.js View on Github external
Nightwatch.cli(function(argv) {
      Nightwatch.CliRunner(argv)
        .setup(null, function(){
          // Code to stop browserstack local after end of parallel test
          bs_local.stop(function(){});
        })
        .runTests(function(){
          // Code to stop browserstack local after end of single test
          bs_local.stop(function(){});
        });
    });
  });
github mucsi96 / nightwatch-api / packages / nightwatch-api / src / client.ts View on Github external
function createRunner(options: IOptions) {
  if (!runner) {
    runnerOptions = {
      env: (options && options.env) || getDefaultEnvironment(),
      configFile: (options && options.configFile) || getDefaultConfigFile(),
      silent: (options && options.silent) || false
    };
    runner = CliRunner({ env: runnerOptions.env, config: runnerOptions.configFile });
    runner.isWebDriverManaged = function() {
      if (this.baseSettings.selenium) {
        this.baseSettings.selenium.start_process = true;
      }
      return true;
    };
    runner.setup();
  }

  return runner;
}
github mucsi96 / nightwatch-api / index.js View on Github external
function getConfig(env) {
    const jsonConfigFile = './nightwatch.json'
    const jsConfigFie = path.resolve('./nightwatch.conf.js');
    const configFile = fs.existsSync(jsConfigFie) ? jsConfigFie : jsonConfigFile;
    const runner = CliRunner({ config: configFile, env });
    runner.setup();
    return runner.settings;
}
github ideal-postcodes / ideal-postcodes-autocomplete / gulpfile.js View on Github external
Nightwatch.cli(args => {
  	args.config = "test/config/nightwatch.local.js";
    Nightwatch.CliRunner(args)
    	.setup(null, done)
			.runTests(null, done);
  });
});

nightwatch

Easy to use Node.js based end-to-end testing solution for web applications using the W3C WebDriver API.

MIT
Latest version published 10 days ago

Package Health Score

92 / 100
Full package analysis