Running e2e tests on Sauce Labs from Protractor on Travis

杀马特。学长 韩版系。学妹 提交于 2019-12-04 00:28:02

Ok so after re-reading all the docs again I found that my config.seleniumAddress was incorrect as it was missing the /wd/hub path at the end; then I got a new error: it was complaining about my credentials.

After diving into Protractor's source I found this doozy, it basically wiped out all the sauce* credentials if I specify a seleniumAddress, so I removed it from my config, tried again and it worked! Woop woop! Here's the Travis output just for fun: https://travis-ci.org/ahmednuaman/radian/jobs/16271613

So the way to get Protractor to run on Sauce Labs via Travis is to use these config options:

config.sauceUser = process.env.SAUCE_USERNAME
config.sauceKey = process.env.SAUCE_ACCESS_KEY
config.capabilities =
  'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER
  'build': process.env.TRAVIS_BUILD_NUMBER

And not to add a seleniumAddress.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!