unittesting

iOS UI Automation Cheatsheet

I have just learned about Apple's UI Automation testing framework. Unfortunately, I don't have an iOS project to work on at the moment, so I am probably going to forget all about it. This is my cheatsheet. It may not help you at all.

Tutorials

Documentation

Tips

  • Use the Tuneup library: https://github.com/alexvollmer/tuneup_js
  • Assign an accessibilityIdentifier to each UI element.
  • Set UIATarget.onAlert to handle externally generated alerts.
  • Use UIAElement.logElementTree() to figure out how to navigate the visual hierarchy.
  • If a value doesn't change when expected, try adding UIATarget.delay(1);

Quick-and-Dirty Guide to QUnit

I'm playing around with JavaScript in my spare time, and have started creating a web app. As I usually do, particularly when learning something new, I am using a test-driven development approach. I looked at a few JavaScript unit-testing frameworks, and decided to go with QUnit, the testing framework used by the jQuery project.

QUnit isn't too hard to set up or use, but my unfamiliarity with JavaScript, jQuery, and related things meant it took a little more work than it should have. A few out-of-date QUnit tutorials on the web made things worse. So, here is a quick-and-dirty QUnit tutorial that might be helpful for others who are the same boat that I was in.

Syndicate content