Unit testing legacy code

What is legacy code?
Some define legacy code as code without proper unit tests.

Consider these:
  • Did you just write some legacy code yesterday?
  • What happens when you are tasked to take over the maintenance of someone else's code; someone's legacy code?
  • What happens when you need to modify someone's legacy code?
Some steps to take when planning to unit test legacy code:
  1. identify the area of change
  2. build safety net over the area before touching/ changing it
  3. refactor the code to ease adding new code
  4. write unit test for issue
  5. write code for fix/ enhancements
Some links to refer to:

Comments

Popular posts from this blog

Understanding ITIL Service Management the UML way…

How to depict (Professional-Looking) Logical Network Diagrams in Astah