Types of automated tests
Although unit tests are probably the most known type of automated testing, there is more to discover. In this section, we will introduce the most common (and important) test types. A well-known testing concept is the testing pyramid, which is shown here:
Figure 10.1: Testing pyramid
This concept basically shows three types of tests—namely, end-to-end tests (or E2E tests in short), integration tests, and unit tests. We will explain each test type and its position in the testing pyramid in the following sections.
Unit tests
As the name implies, unit tests are about testing small units of code. It is best practice to write one test for each functionality of an object only; otherwise, the tests will become bigger and harder to understand and maintain. This keeps the tests small as well, and that is why there is usually a lot of them. Depending on the project size, having hundreds or thousands of unit tests is completely normal...