Test your app’s user interface using scripts

This content has 10 years. Please, read this page keeping its age in your mind.

Before the release of your app you have to test it thoroughly. One tool that you should use is Automation instrument.

Since iOS 4.0, Apple has released a framework called UIAutomation, which can be used to perform automated tests on real devices and on the iPhone Simulator.

Using UIAutomation you can write javascript scripts (or record using the app) and test each UI element of your app.

You can read Apple’s documentation here.

In addition you can read Manbolo’s Team blog post: iOS Automated Tests with UIAutomation.

In Manbolo’s tutorial if you use XCode 4.6 and iPhone simulator and you want to launch your scripts from the command line (far better) consider the following on your terminal:

instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/
Resources/Automation.tracetemplate "/Users/taf/Library/Application Support/iPhone Simulator/6.1/Applications/1A2F9FA2-D08F-4943-AE93-F25EA811DA5E/TestAutomation.app" -e UIASCRIPT /Users/taf/Downloads/TestAutomation/TestAutomation/TestUI/Test-1.js

(different paths from previous versions)