Types of testing
Both tests rely on the Java JUnit library, which helps developers set up their tests and group them into different categories. It also provides different configuration options, as well as extensions that other libraries can build upon. We will also investigate the testing pyramid, which helps guide developers as to how to structure their tests.
We will start at the bottom of the pyramid, which is represented by unit tests, move upward through integration tests, and finally, reach the top, which is represented by end-to-end tests (UI tests). You’ll have the opportunity to learn about the tools that aid in writing each of these types of tests:
- Mockito and
mockito-kotlin
, which help mainly in unit tests and are useful for creating mocks or test doubles in which we can manipulate inputs so that we can assert different scenarios. (A mock or test double is an object that mimics the implementation of another object. Every time a test interacts with mocks...