When you are coming up with a testing strategy for green field applications, you should follow the testing triangle or pyramid. For legacy application, a different strategy is needed.
Writing tons and tons of unit tests when working with a very large application with zero tests is very costly and results in very little benefits. A better approach is to first build a safety net. This is done by writing select well thought out automated acceptance tests that cover large parts of the application as well as the most common workflows. Once those are in place then the team has the beginnings of an automated regression test suite and has some confidence in making changes knowing that they did not break anything.
Now whenever a bug is reported, the team first writes a unit test to show that the bug exists, then they fix the code and rerun the unit test to prove that the fix works and so on. Also, when adding new code, the team starts with unit tests and builds up from there. Following this approach, we will gradually increase our unit coverage to balance out the testing triangle.
Also check out the entire Agile Testing series:
- 4 Typical Transitions Teams Go Through When They First Start Adopting Scrum
- The Most Common Misunderstanding of Agile Software Development
- What are the Different Types of Tests?
- What is The Agile Testing Quadrant?
- Which Tests Should We Automate?
- How Many Tests Are Enough?
- What is The Testing Pyramid?
- When Do We Start Testing in Scrum?
- Who Is Responsible for Testing in Scrum?
- What is Test Driven Development (TDD)?
- Why You Shouldn’t Do Functional Testing From the UI?
- What are Executable Specifications or Specifications by Example?
- What is Acceptance Test Driven Development (ATTD)?
- Testing Green Field Applications vs. Legacy Applications
- What is Exploratory Testing?
- Top 8 Things to Consider for Your Agile Testing Strategy
- Agile Testing – Testing from Day 1 Presentation