how to run Intern's self-tests on mobile on Sa

2019-09-03 03:50发布

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.

标签: intern
1条回答
贼婆χ
2楼-- · 2019-09-03 04:22

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.

查看更多
登录 后发表回答