Skip to content

Instantly share code, notes, and snippets.

@RyanParsley
Created January 28, 2016 20:58
Show Gist options
  • Select an option

  • Save RyanParsley/ccacf9756d5d6a96fbe7 to your computer and use it in GitHub Desktop.

Select an option

Save RyanParsley/ccacf9756d5d6a96fbe7 to your computer and use it in GitHub Desktop.
This doesn't currently work on our server because of a phantom bug. It feels like the right code, I'll have to circle back to this when I have time.
set -e
./node_modules/.bin/webdriver-manager update
./node_modules/.bin/webdriver-manager start 2>&1 &
#wait for selenium
while ! curl http://localhost:4444/wd/hub/status &>/dev/null; do :; done
# Start server
cd dist && python -m SimpleHTTPServer 9999 2>&1 &
pid=$!
# Wait for server
sleep 5s
touch test-results.xml
protractor test/config/e2e.js --baseUrl=http://localhost:9999 --junitReporter.outputFile=test-results.xml --junitReporter.useBrowserName=false --junitReporter.outputDir=''
protractor test/config/e2e-cucumber.js --baseUrl=http://localhost:9999 --junitReporter.outputFile=test-results.xml --junitReporter.useBrowserName=false --junitReporter.outputDir=''
# Stop server
kill "${pid}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment