Introduce unit testing when codebase is already available
Posted
by
McMannus
on Programmers
See other posts from Programmers
or by McMannus
Published on 2012-09-28T08:50:48Z
Indexed on
2012/09/28
9:49 UTC
Read the original article
Hit count: 214
I've been working on a project in Flex for three years now without unit testing. The simple reason for that is the fact that I just didn't realize the importance of unit testing when being at the beginning of studies at university. Now my attitude towards testing changed completely and therefore I want to introduce it to the existing project (about 25000LOC).
In order to do it, there are two approaches to choose from:
1) Discard the existing codebase and start from scratch with TDD
2) Write the tests and try to make them pass by changing the existing code
Well, I would appreciate not having to write everything from scratch but I think by doing this, the design would be much better.
What would you advise me to do?
Thanks for replies in advance!
Jan
© Programmers or respective owner