This is a repo that I am storing all the code samples can be found in Paul Hudson's Testing Swift book.
Testing Swift will give you a thorough grounding in the key testing techniques when working in app development. You'll learn how to benchmark performance, detect regressions, mock components, refactor for testability, and more.
- Structuring your code to make unit testing easier and more reliable.
- Automating your test process so that you can identify problems faster.
- Using the red-green-refactor approach to building high-quality, testable code efficiently.
- Building a solid test suite even in projects where tests are lacking or perhaps missing altogether.
- When code coverage is a useful metric to track your progress – and when it isn't.
- Integrating a sustainable approach to testing that helps your team work faster and with fewer regressions.
- How to separate your model layer from your presentation layer, how to create useful stubs and mocks the hassle-free way, how to build a custom approach to testing that fits your company, project, and team – and more!
