wood burning stoves 2.0*
The moose likes Testing and the fly likes Both from Manning! the difference between JUnit in Action and JUnit Recipes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Both from Manning! the difference between JUnit in Action and JUnit Recipes" Watch "Both from Manning! the difference between JUnit in Action and JUnit Recipes" New topic
Author

Both from Manning! the difference between JUnit in Action and JUnit Recipes

Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
I am wondering what the differences are existing between JUnit in Action by Vincent Massol and Ted Husted and this book in current promotion... Since both of them are from the same publisher, there should be some kinda unique approach in writing styles between them... Can anyone identify one?

But in my own sense, the title "JUnit in Action" seems more practicices and examples than the title "JUnit Recipes", which seems giving some tastes of different unit testings to the readers....


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
you can read some detail of both book at

1. JUnit recipes
2. JUnit in action


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by somkiat puisungnoen:
you can read some detail of both book at

1. JUnit recipes
2. JUnit in action


Mmm... thanks for the links, anyway... What I want to know is not the topics of the books, but the approach the authors use to explain the JUnit... I do believe that there will be some differences, because a single publisher won't publish books with the same approach for JUnit only...

So I think people who has read both books will be able to answer my questions or one of the authors as well....
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

I feel that receipes are like cookbook, they tell you how to get things done.


Groovy
J. B. Rainsberger
author
Ranch Hand

Joined: Aug 05, 2004
Posts: 87
I have read both books, and Vince Massol and I have spoken a fair bit about our respective projects. Vince was the one who recommended me to Manning to write JUnit Recipes, so we're certainly not trying to compete with one another.

JUnit in Action is a deep overview of testing with JUnit. By that, I mean that it covers a wide range of topics in a tutorial/guide format, including an in-depth look at Cactus, which is of importance to J2EE programmers.

JUnit Recipes is more detail-oriented, and its recipes focus on solving individual problems. Although it includes enough introductory material for the person new to JUnit, it presents that material in recipe format, rather than in the format of a general introduction.

If you can, buy and read both! I think that JUnit in Action will do a very good job of giving you general ideas about how to approach testing problems and JUnit Recipes will help you solve the individual problems as they come up.


Author of <a href="http://www.amazon.com/exec/obidos/ASIN/1932394230/ref=jranch-20" target="_blank" rel="nofollow">JUnit Recipes: Practical Methods for Programmer Testing</a>
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by J. B. Rainsberger:
If you can, buy and read both! I think that JUnit in Action will do a very good job of giving you general ideas about how to approach testing problems and JUnit Recipes will help you solve the individual problems as they come up.


Notice, though, that the advanced part of "JUnit in Action" mostly concentrates on testing web applications - for Swing programmers, there might be better books out there?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
J. B. Rainsberger
author
Ranch Hand

Joined: Aug 05, 2004
Posts: 87
One more example of the difference between _JUnit in Action_ and _JUnit Recipes_. Here is a question from the JUnit Yahoo! group.


I am using Junit 3.8.1 with WSAD 5.1
On some workstation the test methods are called in a wrong order, i.e
the last method of the test class is called first a.s.o. up to the
beginning of the class.
Did anybody already get this strange behavior?
Is there a way, to define a parameter for that or is that a known bug?


Go to _JUnit Recipes_, chapter 4, and the various recipes will describe why this isn't a bug and what to do about it.

I want to be clear: _JUnit in Action_ is an excellent book, but if you have a specific problem to solve, _JUnit Recipes_ makes it easier to find a solution.
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
Originally posted by Ilja Preuss:


Notice, though, that the advanced part of "JUnit in Action" mostly concentrates on testing web applications - for Swing programmers, there might be better books out there?


oh!!! some people are still using/developing swing applications??


Kishore
SCJP, blog
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

I've read "Junit in Action" and found it good for developing/selling a testing strategy. It sounds like "Junit Recipes" is more for solving specific problems.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Kishore Dandu:

oh!!! some people are still using/developing swing applications??


Yes, and quite successfully: http://www.disy.net/de/images/cadenza/cdza_prof_big.gif

(The screenshot is out-of-date, it looks much better today! )
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
JUnit Recipes will help you solve the individual problems as they come up.[/QB]


So, JUnit Recipes is like Pattern to solve problen or not ???
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by somkiat puisungnoen:
So, JUnit Recipes is like Pattern to solve problen or not ???

The recipes are solutions to specific problems. Whether the problems are abstract enough to count as problem patterns, I don't know.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Originally posted by somkiat puisungnoen:


So, JUnit Recipes is like Pattern to solve problen or not ???


Maybe the following explains

Q 4 J. B. Rainsberger (2): preconditions for a recipe

Cheers,

Gian Franco


"Eppur si muove!"
Allan Halme
Ranch Hand

Joined: Aug 22, 2003
Posts: 62
Originally posted by Kishore Dandu:
some people are still using/developing swing applications??


Yeah, and I wish I were, too. I've been working with web applications for over four years now and although, on the one hand, I enjoy creating HTML interfaces, especially these days with some cool custom JSP tags we've developed, I would stil SO MUCH prefer to create GUI interfaces, just for the pure pleasure of the performance and usability of the interface and its responsiveness and the flexibility you're afforded.

Doing HTML interfaces makes me feel like this:

... whereas I would like to feel like this:
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Kishore Dandu:


oh!!! some people are still using/developing swing applications??


Me!!! In the last project, I developed CRM applicaiton using Swing to interact with Oracle database.... And it was fun... As I used to develop a lot of Swing applciations in the university life, I'm still liking it, despite of its performance and many defects....

But due to the SWT book promotion in the past, I decided to study SWT and I will use SWT in the upcoming project....
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by J. B. Rainsberger:
JUnit in Action is a deep overview of testing with JUnit. By that, I mean that it covers a wide range of topics in a tutorial/guide format, including an in-depth look at Cactus, which is of importance to J2EE programmers.

JUnit Recipes is more detail-oriented, and its recipes focus on solving individual problems. Although it includes enough introductory material for the person new to JUnit, it presents that material in recipe format, rather than in the format of a general introduction.


So is it like....
If we want to want a ready-made solution for a certain problem, get JUnit Recipes and the solution will be there... but JUnit in Action is more about JUnit in general, teaching how to do things in JUnit?

So will it mean that JUnit is suitable for those who want to learn core JUnit, instead of applying JUnit stuff to the real world?

Thanks a lot, Mr.Rainsberger for the great replies...
Roger Graff
Ranch Hand

Joined: May 29, 2001
Posts: 112
Does either book discuss how JUnit works with a test driven development strategy?

Thanks!
J. B. Rainsberger
author
Ranch Hand

Joined: Aug 05, 2004
Posts: 87
So is it like....
If we want to want a ready-made solution for a certain problem, get JUnit Recipes and the solution will be there... but JUnit in Action is more about JUnit in general, teaching how to do things in JUnit?


Almost.

In learning there are various stages:

1. Unconscious incompetence -- I don't know what I don't know.
2. Conscious incompetence -- I know what I don't know.
3. Unconscious competence -- I do it right without realizing it.
4. Conscious competence -- I do it right and I realize it.

In stage 1, you need overviews and introductions. JUnit in Action does this very well: it helps you most when you don't know what you need to do yet. You read JUnit in Action and it guides you through starting to use JUnit.

In stage 2, you ask questions on mailing lists like "I tried to do X and it didn't work" or "I have no idea how to do Y, what do I do?" You know that you don't know something specific, and you need help with that. JUnit Recipes answers questions this way: it organizes information into answers to questions, or solutions to problems.

Now, JUnit Recipes /also/ includes introductory information, but it is still organized into solutions to problems. You don't know how to test an interface? Recipe 2.6. You don't know how to test a method without a return value? (This is a very common question in stage 2) Recipe 2.2.

With JUnit in Action, you won't necessarily know how to find the specific solution you need to your specific problem. With JUnit Recipes, you just look at the table of contents.

So will it mean that JUnit is suitable for those who want to learn core JUnit, instead of applying JUnit stuff to the real world?


I don't quite understand this question. I don't think it has anything to do with the books: they both give you plenty of information for applying JUnit to real problems.
J. B. Rainsberger
author
Ranch Hand

Joined: Aug 05, 2004
Posts: 87
Does either book discuss how JUnit works with a test driven development strategy?


Vince and I are both TDD practitioners, so yes, although in both cases, we do not talk about TDD as "the way to do it". It's more like this: "If you're a TDD practitioner, you'd do this...."
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

JB,
The stages of learning vs how to get help is interesting!
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by J. B. Rainsberger:

I don't quite understand this question. I don't think it has anything to do with the books: they both give you plenty of information for applying JUnit to real problems.


It's alright. You have provided me the answer to that question already in your explanation above... Thank you very much for your great explanations on both books...
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Jeanne Boyarsky:
JB,
The stages of learning vs how to get help is interesting!


Does it mean that JUnit in Action is for the stages of learning JUnit, while JUnit Recipes is to get helps about JUnit real world problem?

Then we can conclude the difference between JUnit in Action and JUnit Recipes as above sentence.....
Warren Dew
blacksmith
Ranch Hand

Joined: Mar 04, 2004
Posts: 1332
    
    2
Kishore Dandu:

oh!!! some people are still using/developing swing applications??

What do you use instead?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

Originally posted by Ko Ko Naing:


Does it mean that JUnit in Action is for the stages of learning JUnit, while JUnit Recipes is to get helps about JUnit real world problem?

Then we can conclude the difference between JUnit in Action and JUnit Recipes as above sentence.....

Yes! I also found it interesting that JUnit Recipes is more in line with newsgroups and forums.
 
jQuery in Action, 2nd edition
 
subject: Both from Manning! the difference between JUnit in Action and JUnit Recipes
 
Similar Threads
JUnit Books
Junit Recipes/ in action
JUnit - testing approaches
JUnit
Good Book On Cactus and HttpUnit