This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Testing and the fly likes Good books on Junit, JMock Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Good books on Junit, JMock" Watch "Good books on Junit, JMock" New topic

Good books on Junit, JMock

Aravind Arumugam

Joined: Sep 07, 2009
Posts: 4

I've never really used JUnit, but really need to get up with the speed.
So I need a book that explains sound basics & concepts with good hands-on

I checked the previous threads and found the following books,

"JUnit in Action",
"Test Driven Development: A Practical Guide",
Kent Beck's "Test Driven Design by Example",
Hunt's and Thomas' "Pragmatic Unit Testing",
Link's "Unit Testing in Java", and
Derek Lane's O'Reilly title "JUnit: the Definitive Guide"

I'm really confused which one book to choose.
Please suggest a nice book with sound concepts and hands on that brings the reader up to speed.

My another question is,

Can somebody provide me with links or good books for learning JMock?

i have gone to JMock website, but just checkin if anybody have come across some really cool links/books that would help beginners with some hands on?

Rob Spoor

Joined: Oct 27, 2005
Posts: 20080

Moving to our Testing forum.

How To Ask Questions How To Answer Questions
David Newton

Joined: Sep 29, 2008
Posts: 12617

I don't know of any books that cover JMock, but IMO you don't really need a book for that. (I've mostly used Mockito and EasyMock anyway.)

Which book you get may also depend on which version of JUnit you're targeting--I found JUnit in Action quite good, but that was quite awhile ago.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32507

I think it's more important to choose a bug that covers the "proper" version of JUnit. A lot changed between JUnit 3.8 and 4.0. Assuming you are using 4.0, it's better to read a book that does as well.

"Test Driven - Practical TDD and Acceptance TDD for Java Developers" uses JUnit 4.0. "JUnit Recipes" version 2 (not yet published) does as well.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
David Newton

Joined: Sep 29, 2008
Posts: 12617

Book? Your Freudian slip is showing.
I agree. Here's the link:
subject: Good books on Junit, JMock
jQuery in Action, 3rd edition