Testing types
In the previous section, we talked about different types of tests:
- Unit tests: What we call white box tests are what mock the dependencies and test the business flow of a particular piece of code.
- Integration tests: These are designed to test the integration between different components of an application and they do not test the business logic extensively. Sometimes, when the software is not very complex, the integration tests are used as unit tests (especially in dynamic languages), but this is not the most common use case.
- Acceptance tests: Designed to test business assumptions, these are usually built on the principle of what we know as user stories describing situations with the style of being given an assumption.
Every test has a different objective, and they work well together, but keep the following diagram in your mind:
This is what I call the pyramid of testing, and there are years of experience (not only mine) behind it: your software should have a whole bunch of unit...