Skip to content

Instantly share code, notes, and snippets.

@maxmckenzie
Created July 13, 2019 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxmckenzie/2653c5edeb2cbfa014f6d481051b2753 to your computer and use it in GitHub Desktop.
Save maxmckenzie/2653c5edeb2cbfa014f6d481051b2753 to your computer and use it in GitHub Desktop.
nightwatch config for cucumber and gherkin
// http://mucsi96.github.io/nightwatch-cucumber/
const seleniumServer = require('selenium-server')
const phantomjs = require('phantomjs-prebuilt')
const chromedriver = require('chromedriver')
require('nightwatch-cucumber')({
cucumberArgs: [
'--compiler', 'js:babel-core/register',
'--require', 'features/step_definitions',
'--require', 'features/hooks.js',
'--format', 'node_modules/cucumber-pretty',
'features'
]
})
module.exports = {
output_folder: 'reports',
custom_assertions_path: '',
live_output: false,
disable_colors: false,
selenium: {
start_process: true,
server_path: seleniumServer.path,
log_path: '',
host: '127.0.0.1',
port: 4444
},
test_settings: {
default: {
launch_url: 'http://localhost:8080',
selenium_port: 4444,
selenium_host: '127.0.0.1',
desiredCapabilities: {
browserName: 'phantomjs',
javascriptEnabled: true,
acceptSslCerts: true,
'phantomjs.binary.path': phantomjs.path
}
},
chrome: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true
},
selenium: {
cli_args: {
'webdriver.chrome.driver': chromedriver.path
}
}
},
firefox: {
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
acceptSslCerts: true
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment