|
Re: JUnitDoclet 1.0.1 Released
|
Posted: Nov 6, 2002 3:25 AM
|
|
> i think it may be useful when you have existing code that > you want to add unit tests to. Not useful if you develop > new code test-first as should be done in most cases.
Henry,
I prefer to write tests before the application as well and I don't like not compilable code. (As some people have with their way of Test First.)
That's why I write an empty (but compilable) method in the application first, use JUnitDoclet to provide the skeleton, fill in the test(s), see it (them) fail, make them pass and finally refactor.
It's not to different from other approaches, right?
I receive a lot of complaints from people like "When I start a test I don't know what methods I need." Well, they are doing featureoriented testing. JUnitDoclet is helping with structure oriented tests, but does not prevent you from writing your own tests.
Both ways (structure oriented and funktional) have major benefits, why skip one of them?
And because of the help with Refactoring JUnitDoclet provides, it is very easy to rename, introduce or remove methods. No need to think to much upfront about signatures and stuff. Not much of a difference, except you have the full power of your IDE to help you.
If someone did no unit testing before, JUnitDoclet is an easy way to get he/she to start with it. And later they may do Test-First with it. I know some people who say, they would suggest to drop JUnitDoclet once you eached that point. I would not do that, but that's just me. I'm kind of addicted to JUnitDoclet.
Please see the features we plan to implement in the next version. Tests for interfaces and abstract classes that are applied to implementing classes, More than one test method per application method, ...
Regards,
Steffen Gemkow
|
|