Danny Bravo
Danny Bravo

Reputation: 4658

How to I disable UITesting when running tests on a iOS8 device?

I have a project that contains both Unit tests and UI tests. The project, per requirement, has to support both iOS8 and iOS9, and is setup with a continuous integration bot that runs tests on every commit to our repos.

I would like the bot to run tests on multiple devices with multiple iOS versions, to ensure as a minimum that our unit tests are valid across multiple OS versions.

However, I am unable to find an option to disable running UITests on devices running OS versions prior to iOS9, as UI testing is not supported on iOS8. However I would still like to run my unit tests on iOS8.

If I try and run my tests directly on the project using iPhone Simulator 8.2 I get the following error message: "UI Testing is not supported on “iPhone 6 (8.2)” because it is running iOS Simulator 8.2 and UI Testing requires iOS Simulator 9.0 or later."

Any ideas?

Upvotes: 4

Views: 2583

Answers (2)

River2202
River2202

Reputation: 1407

Untick the UI Test checkbox from edit scheme can switch it off when running test scheme by Command+U.

Untick UITest checkbox

Upvotes: 12

dasdom
dasdom

Reputation: 14063

Add a second scheme and remove the UI test from the scheme in the test menu. Then add a bot for that scheme.

Upvotes: 6

Related Questions