Testing Green Field Applications vs. Legacy Applications

Testing Green Field Applications vs. Legacy Applications
Legacy Code

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:

Leave a Reply

Close Menu