April 2026
Intermediate
683 pages
25h 29m
English
Swift provides built-in mechanisms to debug and test code. This appendix will cover those mechanisms.
Programming is not about writing code; it’s about writing correct and reliable code. In that regard, one of the most helpful tools is unit testing, which is the art and science of writing test code to validate your app code.
Most modern programming ecosystems offer some sort of unit test toolkit. Java has JUnit; Python has Pytest; JavaScript has Jest; and so on. Likewise, Swift offers two distinct testing frameworks: XCTest (older) and Swift Testing (newer).
In this appendix, you will learn the basics of unit testing and how to conduct your own unit tests using either tool.
In software development, ...
Read now
Unlock full access