Why should we care to test?
- Fast feedback loop. We want to get feedback quickly if we break functionality and not wait until QA tests it days or even weeks later and we already work on a different user story.
- Refactor aggressively with confidence. We want to keep our code nimble and remove duplication and we need to be confident that we have tests that will catch us if we break the functionality.
- We want to save time. Running even many thousands of unit tests is going to much quicker than manually test every time we make a change that we want to verify if it works.
- We want to be able to integrate and deploy quickly. How can we ever consider moving to Continous Delivery if we don’t have a good test suite? It’s not enough to just have unit tests but they are the base of the testing pyramid and incredibly important.
- Unit tests should be the base of your testing pyramid. We will miss broken functionality if we don’t have a solid base of unit tests. Manual testers can only keep up in a small and simple application.
These are some of the basic reasons why testing is important. As we get more comfortable writing good unit tests, we should learn about TDD and how it helps us design our application and well and the nice benefit that it also gives us lot’s of good unit tests.