Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the best tools for unit testing iphone applications? [closed]

Wondering which tool is considered the best/standard and what the pros/cons are for the various unit testing tools that are available. The tools I'm aware of so far are:

  • Google Toolbox for Mac
  • OCUnit which seems to be the winner for objective-c, but some folks have had trouble with on the iphone
  • rbiphonetest which Dr Nic comments on here

Of course I'd love to learn about any I've missed.

like image 706
dstnbrkr Avatar asked Apr 10 '09 19:04

dstnbrkr


2 Answers

Google toolbox for Mac(GTM) is a superset of OCUnit. It adds more assert macros, and also has a support for UI testing. OCMock is how you can incorporate mock objects into your unit testing environment.

I have just recently created a project and file template for creating static libraries that also has built-in support for unit testing. You can read about it:

http://www.codingventures.com/2009/04/xcode-templates-for-iphone-static-libraries-with-unit-testing/

And the templates are located at:

http://github.com/keremk/iphone-static-library-project-template/tree/master

The file template gives you an easy way to add a unit test class with all the necessary OCMock and GTM/OCUnit headers.

like image 126
keremk Avatar answered Oct 22 '22 09:10

keremk


You may be interested in answers to this question: Do OCUnit and OCMock work on the iPhone SDK?. Some links for short:

  • OCMock and the iPhone
  • iPhoneUnitTesting
  • Stanford iPhone Application Programming CS193P
  • Using OCMock with Xcode 3 in Leopard
  • iPhone Unit Testing | Sen:te
like image 1
mouviciel Avatar answered Oct 22 '22 10:10

mouviciel