In recent years, I have only written small components for people in larger projects or small tools. I have never written a unit test and it always seems like learning how to write them and actually making one takes a lot longer than simply firing up the program and testing for real.
I am just about to start a fairly large scale project that could take a few months to complete and whilst I will try to test elements as I write them (like always), I am wondering if unit testing could save me time.
I was just wondering if anyone could give good advice:
- Should I be looking at unit testing at the start of the project and possibly adopt a TDD approach.
- Should I just write tests as I go along, after each section is complete.
- Should I complete the project and then write unit tests at the end.
© Programmers or respective owner