Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Commit

Permalink
Add Sauce Connect.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarp committed Apr 20, 2015
1 parent 241cf7f commit 1a0d5f2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
python: "3.4"

addons:
sauce_connect: true

env:
global:
- SAUCE_USERNAME: "jmcarp"
- FEC_SELENIUM_DRIVER: "remote"
- FEC_WEB_API_URL: "http://fec-dev-api.cf.18f.us"
- secure: "NynrD/74WTcvizkmRrcJdT1vZk1bcyszxFg2kVcgWoaSolEElozrW3kwOYqL8LUlkZ2vJ+Jgo6b5Zp81Bh9RMeDeoxZTCfVMDH0n1UOpwj+7xEDZ1UHSIQr3RLHEmhcMyp2jfd9WcHjBayW1wYGtRm/YM/aXTun/o3wffxlIt2g="

before_script:
- cd openfecwebapp
install:
- sudo pip install -r requirements.txt
- cd openfecwebapp
- pip install -r requirements.txt
- python __init__.py &

script:
- cd tests
- nosetests -a '!selenium'
- cd tests
- nosetests -a "selenium"
14 changes: 14 additions & 0 deletions openfecwebapp/tests/selenium/base_test_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@
from nose.plugins.attrib import attr


sauce_url = 'http://{0}:{1}@ondemand.saucelabs.com:80/wd/hub'.format(
os.getenv('SAUCE_USERNAME'),
os.getenv('SAUCE_ACCESS_KEY'),
)


drivers = {
'phantomjs': lambda: webdriver.PhantomJS(service_args=['--ignore-ssl-errors=true']),
'firefox': lambda: webdriver.Firefox(),
'chrome': lambda: webdriver.Chrome(),
'remote': lambda: webdriver.Remote(
desired_capabilities={
'platform': os.getenv('FEC_SAUCE_PLATFORM', 'Mac OS X 10.9'),
'browserName': os.getenv('FEC_SAUCE_BROWSER', 'chrome'),
'version': os.getenv('FEC_SAUCE_VERSION', ''),
},
command_executor=sauce_url,
),
}


Expand Down

0 comments on commit 1a0d5f2

Please sign in to comment.