There are two third-party frameworks for dealing with the iOS UI Automation instrument: Alex Volmer's tuneup.js and the Jasmine framework.
What are the differences between these two frameworks and what are their advantages and disadvantages?
There are two third-party frameworks for dealing with the iOS UI Automation instrument: Alex Volmer's tuneup.js and the Jasmine framework.
What are the differences between these two frameworks and what are their advantages and disadvantages?
tuneup.js and Jasmine both provide nice wrappers around UIAutomation's rather verbose and arduous assertion API.
A plus of tuneup.js is that it not only includes the test/assertion abstractions, but also a number of handy convenience methods for performing various common tasks in UIAutomation (typing text into a textfield, for example). The downside to tuneup.js (in comparison to Jasmine), is that it lacks some of the nice delineation that Jasmine provides via nested describe
/ it
spec definitions.
As noted above, Jasmine gives a rich way to define various specs of your app. You can demarkate various tests quite easily. Additionally, if you've used Jasmine in regular ol' Javascript testing, then it'll be very familiar.
In either case, if your app has even a remotely deep element hierarchy, I'd recommend pairing either tuneup or Jasmine with a framework of my own, mechanic.js. Mechanic makes traversing your app's 'DOM' and interacting with elements really easy. Plain ol' UIAutomation can get a bit verbose; mechanic is sort of the JQuery of UIAutomation.
Anyways, my personal choice would be Jasmine + Mechanic in most cases. I prefer the cadence of Jasmine's spec definition API, and paired with Mechanic, makes for terse, readable UI tests.
Jasmine and tuneup.js both provide a similar simple syntax for you to write your iOS automation tests with.
One advantage of Jasmine is that it has a good reporting structure so if you plan on running your automation tests from a CI server such as Jenkins or Hudson, it'll be much easier for your CI server to parse the XML test results from Jasmine versus the .plist format you get when using tuneup.js