Book Review: Instant Mock testing with PowerMock

By , Sunday 5th January 2014 7:23 pm

I was recently asked to review “Instant Mock testing with PowerMock” by PacktPub. Part of their “instant” series which aims to get you up and running with a project quickly. My review follows.

This series of books are meant to be a quick introduction with enough information to get you going with a project. In that respect this book does a very good job of introducing the reader to PowerMock – specifically the Mockito variety (nothing about Easymock covered).

Before I read this book I was familiar with Mockito for mocking as lead developer on the buddycloud java server project. I hadn’t heard of or used PowerMock before reading this book.

Based around a simple, and probably familiar, set of examples upon which the book builds the author takes the user from very simple usage up to more advanced use cases.

If you want to learn about PowerMock’s internals or how it works you will be disappointed, this book takes a pragmatic approach.

A couple of areas where I would have liked to have seen improvement:

– In the introduction the author introduces MockSettings (such as verbose logging) but never discusses them further or shows what some of the most basic options do. I felt this was a big omission
– There is no coverage of alternative libraries (if there are any) and why a developer would use PowerMock vs others

By the end of the book I felt that I could integrate PowerMock and start making good use of it immediately, and in that respect the book does exactly what it sets out to do.

For more information please see:

Liked this post? Follow this blog to get more. 

Leave a Reply

You must be logged in to post a comment.

Panorama Theme by Themocracy

2 visitors online now
1 guests, 1 bots, 0 members
Max visitors today: 5 at 06:39 am UTC
This month: 15 at 10-10-2017 02:55 pm UTC
This year: 45 at 02-01-2017 10:28 pm UTC
All time: 130 at 28-03-2011 10:40 pm UTC