Introduction to UIAutomation, Apple's Automated UI Testing Framework

Aaron Brethorst, October 30, 2012

Earlier today, I gave a webinar entitled Introduction to UI Automation. I want to thank all of the people who watched, and to all of you who asked questions, too.

UIAutomation is Apple’s framework for automated UI testing on iOS. You write your tests in Javascript, and are able to run them via Apple’s Instruments app either via a GUI interface or from the command line. Running from the GUI is challenging due to problems in Instruments, and a bear to set up from the command line on your own, so make sure you read through the projects I mentioned section below to find out how to simplify the process.

As promised, here’s the video of the talk, along with the slides, all of the projects I mentioned, and several other resources that I have found enlightening. Let me know of any other good resources I might have missed!

Projects I mentioned

  • OHHTTPStubs – Easily stub network requests for testing.
  • AutomationExample – Easily interact with Instruments from the command line.
  • Tuneup.js – Helpers to simplify testing with UIAutomation.

Other test frameworks

  • OCUnit – Built in to Xcode, unit testing
  • GHUnit – Unit testing
  • KIF – Functional testing, Objective C
  • Calabash – Functional testing/BDD, Ruby
  • Frank – Functional testing/BDD, Ruby

Videos of visually impaired users interacting with iPhones

Other Resources

WWDC Sessions

  • WWDC 2010: Session 306 Automating User Interface Testing with Instruments
  • WWDC 2011: Session 519 Web Accessibility and Automation
  • WWDC 2012: Session 210 Accessibility for iOS