diff --git a/.travis.yml b/.travis.yml index 3125407a4..9b3f9eb43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,9 +16,14 @@ before_script: - "sh -e /etc/init.d/xvfb start" script: - "firefox --version" - - "python test/run_tests.py python $BROWSER --noncritical known_issue_-_travisci" + - "python test/run_tests.py python $BROWSER" env: matrix: - BROWSER=firefox - #- BROWSER=ie # will be added when we have completed SauceLabs CI - #- BROWSER=safari # will be added after #247 merged + - BROWSER=ie # will be added when we have completed SauceLabs CI + - BROWSER=safari # will be added after #247 merged + global: + - secure: JL3yH6vGVspkmKmXXmKLFXElam1SM3MBKD92CohdJA31WERVWjIJex1veOUKCPVqEBI+H+tXa93LQ8qy+/Ewm/p9XNUc+XUwuLArlgxKlG4k9pFPJr1uUUF8F9CYsP7m7PcPFO4hkn/Kzpq5wxFFMfLM7vXwaqpQSzxJqNxBEQE= + - secure: Ko4lJSVDhkoS9mjIp4TgQnExTCoW+56/6EgYzxx1fwFgmMMVkxIH09Q0bJRgZhA2xbF/xP9jMAKZXGIaKbbxjagkqYc9AhuaCiF7vUohqZV6I6bpZmtKWIuWgC8Gnx6hwVn5bU7t444y789TmLp0cZlGCNiVfBwriveNGNvBxw0= +addons: + sauce_connect: true diff --git a/test/acceptance/resource.robot b/test/acceptance/resource.robot index 2c9b63e0e..5a1f232bf 100644 --- a/test/acceptance/resource.robot +++ b/test/acceptance/resource.robot @@ -7,6 +7,7 @@ Library OperatingSystem ${SERVER} localhost:7000 ${BROWSER} firefox ${REMOTE_URL} ${NONE} +${TUNNEL_IDENTIFIER} ${NONE} ${DESIRED_CAPABILITIES} ${NONE} ${ROOT} http://${SERVER}/html ${FRONT PAGE} ${ROOT}/ @@ -22,6 +23,7 @@ Open Browser To Start Page Open Browser To Start Page Without Testing Default Options [Documentation] Open Browser To Start Page Without Testing Default Options + Set Desired Capabilities Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} ... desired_capabilities=${DESIRED_CAPABILITIES} ${orig speed} = Set Selenium Speed ${SPEED} @@ -32,6 +34,7 @@ Open Browser To Start Page And Test Implicit Wait [Arguments] ${implicit_wait} [Documentation] This keyword tests that 'Set Selenium Implicit Wait' and ... 'Get Selenium Implicit Wait' work as expected + Set Desired Capabilities Should Not Be Equal 0 ${implicit_wait} ... Please do not pass in a value of 0 for the implicit wait argument for this function ${old_wait}= Set Selenium Implicit Wait ${implicit_wait} @@ -70,3 +73,8 @@ Set ${level} Loglevel Verify Location Is "${relative url}" [Documentation] Verifies location Location Should Be ${ROOT}/${relative url} + +Set Desired Capabilities + [Documentation] Builds the DESIRED_CAPABILITIES dictionary + ${capabilities}= Create Dictionary tunnel-identifier=${TUNNEL_IDENTIFIER} + Set Global Variable ${DESIRED_CAPABILITIES} ${capabilities} diff --git a/test/env.py b/test/env.py index efc6c4148..2c97ec399 100755 --- a/test/env.py +++ b/test/env.py @@ -10,6 +10,10 @@ RESULTS_DIR = os.path.join(ROOT_DIR, "results") HTTP_SERVER_FILE = os.path.join(RESOURCES_DIR, 'testserver', 'testserver.py') SRC_DIR = os.path.join(ROOT_DIR, "..", "src") +TRAVIS = os.environ.get('TRAVIS') +TRAVIS_JOB_NUMBER = os.environ.get('TRAVIS_JOB_NUMBER') +SAUCE_USERNAME = os.environ.get('SAUCE_USERNAME') +SAUCE_ACCESS_KEY = os.environ.get('SAUCE_ACCESS_KEY') sys.path.insert(0, SRC_DIR) sys.path.append(LIB_DIR) diff --git a/test/run_tests.py b/test/run_tests.py index ac7f69c8c..7d84f7b0e 100755 --- a/test/run_tests.py +++ b/test/run_tests.py @@ -13,6 +13,8 @@ '--outputdir', '%(outdir)s', '--variable', 'browser:%(browser)s', '--variable', 'pyversion:%(pyVersion)s', + '--variable', 'SAUCE_USERNAME:%(sauceUserName)s', + '--variable', 'SAUCE_ACCESS_KEY:%(sauceAccessKey)s', '--escape', 'space:SP', '--report', 'none', '--log', 'none', @@ -36,6 +38,13 @@ def acceptance_tests(interpreter, browser, args): ARG_VALUES['browser'] = browser.replace('*', '') ARG_VALUES['pyVersion'] = interpreter + sys.version[:3] + ARG_VALUES['sauceUserName'] = env.SAUCE_USERNAME + ARG_VALUES['sauceAccessKey'] = env.SAUCE_ACCESS_KEY + ARG_VALUES['travisJobNumber'] = env.TRAVIS_JOB_NUMBER + if env.TRAVIS: + ROBOT_ARGS.extend(['--noncritical', 'known_issue_-_travisci']) + ROBOT_ARGS.extend(['--variable', 'REMOTE_URL:http://%(sauceUserName)s:%(sauceAccessKey)s@ondemand.saucelabs.com:80/wd/hub']) + ROBOT_ARGS.extend(['--variable', 'TUNNEL_IDENTIFIER:%(travisJobNumber)s']) start_http_server() runner = {'python': 'pybot', 'jython': 'jybot', 'ipy': 'ipybot'}[interpreter] if os.sep == '\\':