In the previous chapter, to facilitate explaining what tests are and their benefits, I put all the different types of tests in a single, big conceptual box. I showed tests that dealt with databases, tests that directly called one function, and tests that called multiple functions. In this chapter, I’ll take tests out of that box and put them into separate shelves, each one containing tests of a different kind.
It’s essential to understand how tests fit into different categories because different types of tests serve different purposes. When building a car, for example, it’s crucial to test the engine and the ignition system individually, but it’s also vital to ensure they work together. If not, both the engine and the ignition system are useless. It’s equally as important to test whether people can drive the car once all parts are in place, or else nobody will go anywhere.