Cédric Beust ♔ wrote:
>
> On 8/2/06, Jean <
2004jing.lei@...
> <mailto:2004jing.lei%40gmail.com>> wrote:
> >
> > I have to say it's fun to do the implement coding. But it's suffering to
> > write JUnit cases.
>
> Don't feel bad, your situation is pretty common in my experience.
>
> The important thing is to realize that tests are important and always do
> your best to make them part of your development process. We all know that
> in the real world, sometimes, other tasks take precedence. Just exercise
> your judgment, put testing in the backseat when the circumstances warrant it
> (tight deadline, angry customer, etc...) but always remember to get back to
> them and pay your technical debt whenever you get a chance.
I'd have to admit that I find coding the /tests/ quite interesting and
challenging in their own right. Here are just some of the things that
testing has introduced me to, which I may never have otherwise come across:
* java.lang.reflect.Proxy - awesomely powerful. 99% of what you need it
for is covered by mock objects, but for that remaining 1%, it's
indispensible
* Jetty (www.mortbay.org) - I've got network utility tests that stand up
an embedded Web server to serve content. One example is a wrapper around
java.net.URL that verifies content types (e.g. MIME types). Its test
pretty much requires a live Web server to vend the appropriate content.
* java.lang.AccessibleObject.setAccessible(boolean) - the subject of a
recent thread here
* code correctness tools (PMD, findbugs, checkstyle) - technically not
limited to testing, but that's how I got exposed to it
* dependency injection
* and many more
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/junit/<*> To unsubscribe from this group, send an email to:
junit-unsubscribe@...
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/