iPhone and iPad Automated Testing With Paul Merrill

Bronto hosted the July 2014 TriTAUG meetup, which focused on the constantly evolving field of automated user-interface testing. Paul Merrill from Beaufort Fairmont was on hand to give us a rundown of using Instruments and Frank, two tools designed to help lighten the load on iOS devices.

If you have never done any form of iOS development or testing, you can be up and running in no time by harnessing Xcode and a demo application from Apple.  You can find Xcode in the App Store and the Recipes application here.

Once the open demo application is running (Product > Run), you can start up an Instruments session (Xcode > Developer Tool > Instruments) and point your testing target at the simulated iPhone application running.  You’ll then be fully clickable, swipeable, navigable, and testable.

It’s not readily clear, but this simulation runs under the path:
/Users/<user>/Library/Application Support/iPhone Simulator/7/Applications/<guid>/Recipes

Recipes application successfully selected as a Target in Instruments.

Recipes application successfully selected as a Target in Instruments.

In general, Instruments provides a set of tools that can be utilized to ascertain various application behaviors and performance. In this particular case, the Automation Instrument allows for the access and assertion of your application’s ui elements. The interface is relatively straightforward; it even has a recording mode that enables the user to step through the application while logging target information.

Recorded script targets can then be edited and played back in real time.

Recorded script targets can then be edited and played back in real time.

Selenium IDE comes to mind regarding this process. The concepts of Instruments are geared more toward those with some scripting experience or really anyone interested in a more programmatic approach. If you have a grasp of JavaScript, you’ll begin to feel at home in the editor window.

For those who perhaps do not want to get that down and dirty in scripting, another option, to be frank, is Frank.  (I’m sorry, I couldn’t help myself.)

Frank acts as an intermediary between UISpec and Cucumber, with regard to automated testing. UISpec is the framework that directly interacts with your iOS Device and Cucumber is the tool that executes text-based functionally descriptive tests. As a bonus, Frank is bundled with a package called Symbiote that lets you visualize your test performance in real time. A great getting started guide can be found here, as well as a demo of the functionality below.

While at Bronto we do not currently have a mobile application, it’s something that is always on our radar. The above options are something to seriously consider though as a means to efficiently verify user experience on a mobile platform. We would like to thank Paul for taking the time to present at TriTAUG. If you’d like to dig deeper, check out his blog post at Beaufort Fairmont.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s