4

So I spent some time on implementing the first UITests in Xcode 7 to automatically test the main workflows in our app. And everything went fine locally.

However, when I pushed the UITests to the C.I. (Xcode Server) the build broke with the following log message:

xcodebuild: error: Failed to build workspace mycoolapp with scheme mycoolapp.

Reason: UI Testing is not supported on “iPad 2” because it is running iOS Simulator 8.1 and UI Testing requires iOS Simulator 9.0 or later.

4.684 (4.687) seconds Test Suite 'mycoolappUITests.xctest' failed at 2015-10-14 11:21:45.242. Executed 2 tests, with 2 failures (0 unexpected) in 12.217 (12.229) seconds

So what I understand is that UITests are only supported by iOS 9.x devices (which is reasonable).

What I don't understand is that I can't seem to configure the Xcode Bot to only run UITests on certain devices and UnitTests on all devices.

Am I right about this or is there a configuration option I'm missing? Did anybody run into the same problem?

floriankrueger
  • 2,003
  • 2
  • 16
  • 25

1 Answers1

1

I reckon you should be able to create a new scheme to run your UI Tests and uncheck unit tests from the Test action in Edit Scheme.

enter image description here

Later you can configure your new bot settings be specifying the UI Test scheme, selecting the "Perform test action" and select the iOS9 devices connected to your server.

You can continue to run unit tests with existing bot on all iOS devices and simulators.

Sushant
  • 440
  • 3
  • 8
  • Thank you for the input, I already have this configuration up and running. The downside is, that errors during UI Tests have to be matched against builds of the "normal" Bot manually. There's no way to specify a dependency between bots and thus continuous delivery is broken (or doesn't consider UI Tests which makes them kind of obsolete/useless). – floriankrueger Oct 27 '15 at 11:31