Unit testing best practices for a unit testing newbie
Posted
by
wilhil
on Programmers
See other posts from Programmers
or by wilhil
Published on 2011-03-31T14:01:31Z
Indexed on
2012/10/19
11:25 UTC
Read the original article
Hit count: 674
testing
|unit-testing
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