Quick overview of UIAutomation

25 06 2010

UIAutomation is a new plugin, previewed at WWDC, that will be in the version of Instruments shipping with the iOS 4 SDK. Essentially it allows scriptable testing of the UI. This is one of the few (if any) instances of Apple supporting Behavior Driven Development (BDD) in their developer programs and it is very exciting.

If you have spent any amount of time with BDD in Ruby on Rails, this should be familiar to you. If not, here are the basics. As the developer builds out new features or modifies existing ones, he or she can create simple test scripts that will be read and parsed to create a virtual interface for the application that will only be seen by the testing software. Here, it is Instruments. In Ruby on Rails, it is Cucumber.

UIAutomation makes use of JavaScript-based scripts to describe what the test should do and what it should be testing for. Unlike Cucumber, which runs in an invisible, virtual browser, UIAutomation will actually run on a development device and operate the application on the screen, for the developer to see. The team at Apple that created this plugin has come up with a way to describe UI elements and features on the screen in JavaScript.

The script will run through the tests that are specified and, as it runs, it will deliver a running report of what has happened so far. When it is done, the developer can save the results of the test session.

As someone who spent most of his summer in 2009 writing Cucumber scripts and wading neck-deep in BDD, it is a little exciting to see this kind of testing coming to the iPhone. Hopefully, it will be available for Mac development, as well. When I have the new development tools in my hands, I will give you a more detailed tutorial.

Advertisements

Actions

Information

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s




%d bloggers like this: