O'Reilly logo

Test iOS Apps with UI Automation by Jonathan Penn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running Tests on an Attached Device

Running tests on the simulator is a great first line of defense for testing behavior, but it is important to check them on the device as well. There’s just enough difference between the SDKs and architectures to make it worth our while to explore how to do it from the command line.

Instruments is quite capable of pulling this off, but we’ll need to adjust how we build the application with xcodebuild. We also need to choose a different set of scripts depending on what device is connected. And we’ll look into an unofficial hack that sometimes works to install the app automatically on a device marked for development. At least we’ll wrap the mechanism in a part of the script that we can swap out with an official ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required