Book Review – Starting to Unit Test: Not as Hard as You Think

Starting to Unit Test: Not as Hard as You Think is a good little book about testing computer programs. It teaches beginners how to write unit tests for their code.

A unit test is a small test that tests one specific behavior of a small piece of the code base like for example a small function in C. All more serious programming projects will benefit from unit tests since it reduces the number of bugs.

The book is written for persons that have not previously done any unit testing and serves as a good introduction to this topic. Both how to write tests for new code and how to tackle legacy code that does not have any unit tests is covered.

This review is based on the paper version of this book and there are unfortunately some minor issues with this version of the book. The material is taken more or less directly from a web blog and there are references to links in the book that are obviously not clickable in the paper version. There is no list of references so it can be hard to figure out where some of the links in the text can be found online.

Another minor issue is the layout of the code examples in the book. The width of the text in the book is narrow which is nice for readability of the ordinary text but works less well for the code. There are plenty of line breaks in the middle of the code rows and the code indentation is kind of strange. This could have looked a lot better by just removing the line numbering in the code and chosen a slightly smaller font for the code examples.

Hard facts

Title: Starting to Unit Test: Not as Hard as You Think
Author: Erik Dietrich
ISBN: 978-1-61984-995-2
Published: 2014
Number of pages: 104

Verdict

Good book for any software developer that want to start with unit testing. Only 104 pages so can be read fast but maybe not great value if you count number of dollars per page.

Rating: 3 on scale from 1 to 5 where 1 isĀ  a waste of time and a 5 is a master piece.

 

Leave a Reply

Your email address will not be published. Required fields are marked *