Testing pyramid
The testing pyramid is a conceptual framework in which various levels of tests in software development emerge as a hierarchical structure. This concept was made popular by Martin Fowler in 2009 in his The Testing Pyramid article. The testing pyramid is illustrated in Figure 13.2:
Figure 13.2 – Testing pyramid
In this section, we’ll explore all the levels of the testing pyramid.
Unit testing
The bottom level of the pyramid is unit testing. Unit tests are the foundation of the testing pyramid. They focus on the smallest building blocks that can be tested in isolation. They often test the behaviors of functions, and they are executed as a part of the local project build.
Unit tests are comparatively easy to write and execute due to their small size and scope. Unit tests can be run inside the Integrated Development Environment (IDE), which provides the quickest feedback loop. Bugs can be found and reported by unit tests...