Skip to content

Instantly share code, notes, and snippets.

@openam
Created December 8, 2014 22:52
Show Gist options
  • Select an option

  • Save openam/2bbad2de1c0974faa99d to your computer and use it in GitHub Desktop.

Select an option

Save openam/2bbad2de1c0974faa99d to your computer and use it in GitHub Desktop.

Setup

General

# setup and install protractor for testing
npm install -g protractor
npm install -g karma-cli
webdriver-manager update

# prepare local application
npm install
bower install
git submodule init
git submodule update

Finally, run npm test to ensure tests pass.

BrowserStack setup

download driver from http://www.browserstack.com/local-testing#command-line

# setup BrowserStack by adding the following to ~/.bash_profile
# your info may be found at https://www.browserstack.com/accounts/automate
export BROWSERSTACK_KEY=Value
export BROWSERSTACK_USER=Username

# reload your bash profile
source ~/.bash_profile

Development

Update SublimeText Preferences.sublime-settings and add "test/api-server" to the "folder_exclude_patterns" option.

Testing

# unit testing
karma start

# end to end testing locally
npm test

# end to end testing on BrowserStack
# start the driver downloaded from BrowserStack
./BrowserStackLocal $BROWSERSTACK_KEY 8080,0
protractor test/protractor.conf.browserstack.js
@openam
Copy link
Author

openam commented Dec 17, 2014

For running all the test server and using BrowserStack use: ./BrowserStackLocal $BROWSERSTACK_KEY 9001,0,9002,0,9003,0,9004,0,9005,0,9006,0,9007,0,9008,0,9009,0,9010,0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment