KIF - Square's iOS Integration Testing
If you have unit tests1 in your iOS apps, which you should, and want to simulate user interaction you’re surely using Instruments’ UI Automation2 which consists of one, or more, Javascript file(s) containing those tests. Yes, it seems odd to use Javascript to perform UI tests inside an iOS application. So you have to, at least, know two different programming languages and take the time to know how to traverse your UI hierarchy, with Javascript, in order to get the correct element for each of those interactions.
All that testing should now be easier as the guys at Square released KIF, the “Keep It Functional” framework. The short description:
(…) We developed KIF to meet a few goals:
- KIF requires minimal setup to run a test suite
- KIF lets you develop your tests in the same language as the rest of your code to minimize learning and adaptation layers
- KIF can be easily extended to fit your needs
- KIF works in continuous integration (CI) setups
Read the post in their blog and get it at https://github.com/square/KIF.
@joshaber is porting KIF to run with MacOS applications. Check it out.
http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html ↩︎
http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Built-InInstruments/Built-InInstruments.html#//apple_ref/doc/uid/TP40004652-CH6-SW75 ↩︎