I work on projects which are usually of a duration, not more than 3 months.
Recently there has been a discussion about the use of JUnit in the projects.
There are activities being planned related to that and, there could possibly be some kind of training too.
But I was wondering whether it is a good idea to use JUnit for such short term project?
Isn’t JUnit more suited for longer duration projects?
I need to know this, so that I can inform my team well in advance before any crucial hours are spent.
5
If you’re positive your project will never be worked on ever again after those initial 3 months, then unit testing is less important.
If, on the other hand, it is quite possible that after some period of inactivity you require another development phase then unit testing is more important.
Your unit tests will really show their worth as automated regression tests. Long after everybody has forgotten the ins and outs of the code, your unit tests will be able to tell you when you’ve messed something up. They are an invaluable safety net in iterative projects.
4
Duration of the project is irrelevant.
If you have a project that might only take a few hours, and you want automated, repeatable tests, then use of something like JUnit is justified. Heck, I’ve been happy creating unit tests even for throw-away projects. The point isn’t how long the project is going to take, but how useful having automated tests is going to be.