Testing Frameworks

Beyond Apple’s built-in unit test framework, some further internal and external frameworks exist to make your testing life easier. We are just going to touch on these briefly so that you are aware of what they are and what options are available to you to make the best app that you can.

OCMock

At this point, you might be wondering how to test any functionality that requires a call to the network when we don’t have Internet, or a request for which we always want the exact same response. For this kind of testing, you would need to employ a mock object. A mock object is like a Patronus from Harry Potter. Like Harry Potter’s Patronus, a mock object is an imaginary object we conjure into existence as a stand-in for a real being. ...

Get iOS 8 SDK Development, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.