The Purpose of Code Tests
Explore the purpose of code testing and why it matters in development. Understand when to create tests, how to weigh their benefits versus costs, and the importance of informative and manageable tests. Discover concepts like unit, snapshot, and integration testing to improve code reliability and maintainability.
We'll cover the following...
Sometimes, we’ll find parts of the code that we don’t fully trust, even after carefully writing it. It could be that someone else wrote it, and we don’t trust our understanding of it. In either case, testing should help. The subject of the next four chapters is what to test, how to test, and how to manage those tests. Testing works best in the small and in the large, but not in-between.
Testing a collection of functions
It’s useful to test a function and an entire use case of an application, but testing a collection of functions is problematic for two reasons:
-
First, any ...