Chapter 13. Writing Unit Tests
We've finished building our app! We've implemented a handful of features, and everything works as expected. And we had no real setbacks along the way! However, this is not the norm: you usually don't have a guide helping you through your project.
When working on a software project, your code base can sometimes get a bit unruly. When a project gets big enough, you might start touching old code to add new functionality, when suddenly, your whole app is broken! Something you had been fumbling with must have been important, because now you've got a mess on your hands.
In this chapter, we'll be covering the concept of unit tests, and code testing in general. The goal of writing tests for your code is to make sure that all of your code is performing its intended function, and to let you know as soon as that stops being the case. Specifically, we'll learn about:
- What are unit tests?
- Testing tools provided by Xcode
- Using the XCTest...