how to run Intern's self-tests on mobile on SauceLabs?

烂漫一生 提交于 2019-12-12 06:40:05

问题


How do I make an Intern configuration file that runs its tests on iOS and android via SauceLabs?

The selftests.intern.js file is only set to run against desktop devices. I figured out you can run against an Android simulator via:

{ browserName: "android", platform: "Android" }

but that gets some test failures.

Worse yet, I can't get iOS (any version) to work. I've tried

{ platform: "OS X 10.8", version: "6.1", browserName: "iPhone"}

and

{ platform: "OS X 10.8", version: "7", browserName: "iPhone Simulator"}

They both say the environment is not supported.


回答1:


A valid iPhone environment object looks like this:

{ browserName: 'iphone',
  platform: 'OS X 10.8',
  version: '6.1',
  'device-orientation': 'portrait',
  'selenium-version': '' }

For whatever reason, providing any non-empty selenium-version (which the configuration does by default) will cause a “Browser failed to start” error in Sauce even though the browser appears to start fine.

With regards to Android test failures, these are caused due to a bug in the AndroidDriver, http://code.google.com/p/selenium/issues/detail?id=4816.



来源:https://stackoverflow.com/questions/20019561/how-to-run-interns-self-tests-on-mobile-on-saucelabs

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