What’s Next?

Now your tests can handle user input from button taps and alerts. Remember, you’re getting this with unit tests, which are faster than UI tests. Unit tests also give us opportunities to isolate difficult dependencies, which makes the tests easier to maintain.

Let’s continue our tour of things to test in iOS apps. In the next chapter, we’ll see how to test navigation between view controllers.

Get iOS Unit Testing by Example 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.