Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit Testing and Code Coverage Frameworks for Objective-C?

I'm planning to write couple applications for iPhone and wonder if there are any Unit Testing and Code Coverage Frameworks for Objective-C?

like image 770
Roman Kagan Avatar asked Apr 15 '10 15:04

Roman Kagan


People also ask

What is the best unit test framework for C?

The most scalable way to write unit tests in C is using a unit testing framework, such as: CppUTest. Unity. Google Test.

Which framework is used for unit testing?

For performing unit tests on Java-based applications, developers often use two frameworks: JUnit and NUnit. Developed by Erick Gamma and Kent Beck, JUnit is the preferred choice for automating unit tests for Java-based applications. It was developed with the sole intention of writing and running repeatable tests.

What is code coverage in unit testing?

Unit tests help to ensure functionality and provide a means of verification for refactoring efforts. Code coverage is a measurement of the amount of code that is run by unit tests - either lines, branches, or methods.


1 Answers

For unit testing iPhone apps there is OCTest or Googles iPhoneUnitTesting

For a mocking framework you can use OCMock. Here is the guide to getting it to work with the iPhone.

GCov can be used for code coverage.

like image 60
Mongus Pong Avatar answered Sep 18 '22 18:09

Mongus Pong