File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Should unit testing be given up?

 
zhengzwang
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unit test is good in many aspects. But do you think it much expensive to write full set of unit tests for our business methods, especially enterprise application business methods?
The full set of unit tests include one or more ok test (a mediation business method require multiple ok unit tests), multiple data validation tests, multiple exception tests. Further, when you write in-container unit test, which is the most often seen condition for j2ee application development, you may experience pain on DbUnit, ServletTestCase or StrutsTestCase framework usage.
After nearly half a year practicing on unit test and test-driven development, I am frustrated very much, because I spent much more time on writing unit test code than on writing the business method implementation.
Can anyone tell me whether I should give up the unit testing?
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "zzz www "-

Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

Enjoy your time here.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your screen name still doesn't follow the policy; we need a first name, a space, and a last name.

Also, this isn't a question about the Java language, so it doesn't belong in our "Advanced Java" forum; I'm going to move it to our "Testing" forum for continued discussion.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, does your code have to actually work?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic