A new book which I have already read is about testing. About white box testing in java. A new of the book is “Practical Unit Testing with TestNG and Mockito“. An author of the book is Tomek Kaczanowski. Before I’ll start a book review I want to mention that I have had previous experience in unit testing, but this book has opened for me new aspects in unit testing.

Traditionally I want to start from those people for whom this book is written. Definitely when Tomek was writing the book he wanted to make it as clear as it can be for beginners. But in the same time he outlined information in a very well structured way, what can be very informative for experienced guys. Despite the book is about Java and Java related libraries, it also covers common concepts, so it can be helpful for those who use some other programming language.

The book consists of 448 pages. At the first glance it’s big size for a such book. Personally I thought so until I have read it. But the author put very detailed explanations inside the book with code samples and theory sections. Thank to this a reader gets a deeply understanding of all unit testing principles during the reading. After the reading you will know what is the difference between state testing and integration testing, what distinctions between dummy, stub spy and mock. Also you will know how to write unit tests in a TDD manner and a lot of library specific things (TestNG, Mockito).

The book is broken up on well structured sections. Each section has its own exercises. Sometimes I thought that Tomek explains very detail some things, but you can skip several paragraphs any time you want, if you feel that you know a particular material. Also I want to say big thanks to Tomek for a humor on the book pages, it makes the reading not boring. I recommend this book to all of you who want to learn how to develop unit tests and to apply TDD in your own practice.

About The Author

Mathematician, programmer, wrestler, last action hero... Java / Scala architect, trainer, entrepreneur, author of this blog