How to use @wdio/cli - 3 common examples

To help you get started, we’ve selected a few @wdio/cli 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 motss / app-datepicker / run-tests.js View on Github external
// force shutdown after 15s timeout
    setTimeout(() => {
      debug(`Could not close server in time, forcefully shutting down`);
      process.exit();
    }, (15e3));
  };

  debug(`es-dev-server running at port ${PORT}...`);

  [
    'SIGTERM', // kill
    'SIGINT', // Ctrl or Cmd + C
  ].forEach(n => process.on(n, gracefulShutdown));

  const wdio = new Launcher(readArg('--config-file'));

  await wdio.run();

  debug(`Completed. Closing server...`);

  gracefulShutdown();
}
github elastic / apm-agent-rum-js / dev-utils / test-utils.js View on Github external
function runE2eTests(configFilePath, runSelenium) {
  const wdio = new Launcher(configFilePath, {})
  function runWdio() {
    wdio.run().then(
      function(code) {
        process.stdin.pause()
        process.nextTick(() => process.exit(code))
      },
      function(error) {
        console.error('Launcher failed to start the test', error)
        process.stdin.pause()
        process.nextTick(() => process.exit())
      }
    )
  }
  if (runSelenium) {
    startSelenium(runWdio)
  } else {
github sneakypete81 / updatescanner / scripts / lib / wdio.js View on Github external
exports.run = async function() {
  const Launcher = require('@wdio/cli').default;
  const wdio = new Launcher(
    __dirname + '/../../test/functional/wdio.conf.js', {});

  return await wdio.run();
};

@wdio/cli

WebdriverIO testrunner command line interface

MIT
Latest version published 3 days ago

Package Health Score

98 / 100
Full package analysis

Popular @wdio/cli functions