• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JUNIT how many hours need to learn it ?

 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it neccessary for me to study JUNIT deeply, I think It is nothing more than some assert methods. now I study a book(JUnit recipes) but I think there is alot unnecessary explanation and it is possible to learn JUNIT within few hours.
what is your idea ? please let me know.
I also want to learn it because every job advertisment that I saw request for it and I find it an intersting way of testing but I don't know how important is to learn it deeply.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can learn to use JUnit in a matter of minutes. To learn to use it well can literally take years. It's the same with many other things. Sure, you can study for the SCJP for 3 months and pass it, but that doesn't mean you know how to program well in Java.

"JUnit Recipes" is a great book. It contains years worth of hard-won experience. The problem is, though, that you can't truly appreciate this kind of book until you've had some experience using the tool and seen some of the problems and pitfalls that you can run into.
 
Reza Rav.
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK so for my usage(just know it and don't need to work with it deep) I prefer to read my lovly "Thinking in java".
After I read 115 page of JUnit Recipes, I don't find anything about teardown() so I don't find it interesting book (from my point of view).

And what you said about SCJP you are right, being good programmer is not a 3 month study and certification I agree with you but I wish you don't mean that it is not valuable because it help me alot in my experience .

I also hope you don't mean I'm not good programmer because I ask you question about studying Junit don't need lots of time.

[ October 27, 2005: Message edited by: Reza Rawassizadeh ]
[ October 27, 2005: Message edited by: Reza Rawassizadeh ]
 
Reza Rav.
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I should be fair:
I get some good idea from reading that book till page 188
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most of the book is a catalog of solutions to problems you *may* run into. It's not that much of a teaching book - you don't need to *learn* them all at once. It is a reference book - if you encounter a problem, look into the book to see whether it helps in finding the solution.
 
Reza Rav.
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
YES you have right I'm worng, it is good book for reference and contain very usefull idea but not for tutorial
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't mean to imply that you're a bad programmmer -- I just wanted to make it clear that while you can learn JUnit in a day, you won't learn to use it well without a lot of experience.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Reza, Ernest is right.

Everyone who starts unit testing are more worried about testing frameworks (JUnit , Dbunit , xUnit etc) rather than the philosophy behind testing.
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't forget to combine code coverage analysis with your unit testing. I am always very surprised when I see the first coverage results for my tests. Often I could delete 30% of the code and the tests would still just run fine.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Harald Kirsch:
Don't forget to combine code coverage analysis with your unit testing. I am always very surprised when I see the first coverage results for my tests. Often I could delete 30% of the code and the tests would still just run fine.



I assume you don't do test driven development?
 
Harald Kirsch
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ilja Preuss:


I assume you don't do test driven development?



Just checked quickly over at wikipedia to make sure this buzzword is what it sounds like it is, and indeed it is. Consequently my answer to your question is "yes".
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Harald Kirsch:

Just checked quickly over at wikipedia to make sure this buzzword is what it sounds like it is, and indeed it is. Consequently my answer to your question is "yes".



You should try it some time, it's a fun way to work!

In my experience, code coverage still is insteresting to take a look at from time to time with TDD, especially when you are at the beginning of learning it, but it becomes much less surprising.
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't know know if this will be helpful, but here's an extract from a build file showing how I use Junit:
 
author
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Reza Rawassizadeh:
OK so for my usage(just know it and don't need to work with it deep) I prefer to read my lovly "Thinking in java".
After I read 115 page of JUnit Recipes, I don't find anything about teardown() so I don't find it interesting book (from my point of view).



This is by far the strangest complaint I've seen so far about the book. Reza, if you are specifically interested in tearDown(), then did you look in the index to see where I use tearDown()?

You might also consider that if I don't talk about tearDown() in the first 115 pages, then perhaps it's because I don't use tearDown() very much at all.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic