Skip to content

Instantly share code, notes, and snippets.

@jaffamonkey
Created May 3, 2018 12:49
Show Gist options
  • Save jaffamonkey/248705ab880915f5600475d3606533fc to your computer and use it in GitHub Desktop.
Save jaffamonkey/248705ab880915f5600475d3606533fc to your computer and use it in GitHub Desktop.
Travis file for running Nightwatch/CucumberJS tests on iOS using Appium/XCode
sudo: required
os: osx
language: node_js
node_js: '7'
include:
- osx_image: xcode9.2
env: DEVICE=10.2
before_script:
- ( sudo Xvfb :99 -ac -screen 0 1024x768x8; echo ok )&
- sleep 3
script:
- npm install -g appium
- appium &
- sleep 10
- npm install
- npm run nightwatch-cucumber-travis-ios -- --tag iostest
const seleniumServer = require('selenium-server')
const chromedriver = require('chromedriver')
require('nightwatch-cucumber')({
cucumberArgs: [
'--require', 'step-definitions',
'--require', 'support',
'--require', 'page_objects',
'-- --tag', 'ci',
'--format', 'node_modules/cucumber-pretty',
'--format', 'json:reports/cucumber.json',
'features'
]
})
module.exports = {
output_folder: 'reports',
custom_assertions_path: 'step-definitions/assertions',
page_objects_path: 'step-definitions/page_objects',
globals_path : 'step-definitions/globals/globalModules.js',
live_output: false,
disable_colors: false,
selenium: {
start_process: false,
server_path: seleniumServer.path,
log_path: '',
host: '127.0.0.1',
port: 4444
},
appium: {
start_process: false
},
test_settings: {
default: {
launch_url: 'http://google.com',
selenium_port: 4723,
selenium_host: '127.0.0.1',
silent: true,
desiredCapabilities : {
browserName : 'Safari',
platformName : 'iOS',
platformVersion : '10.2',
deviceName : 'iPad Air 2',
},
screenshots : {
enabled : true,
on_failure : true,
path: './reports/screenshots'
},
selenium: {
cli_args: {
'webdriver.chrome.driver': chromedriver.path
}
}
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment