A short book about writing better tests.
Based on real-world examples.
Concise & practical.

Nowadays developers are expected to provide code verified by automated tests. And this is good.

Unfortunately, not all of the tests we write are good enough... This book provides numerous examples of improvements you can introduce to make your tests stronger, more readable, and more resilient to changes. You will learn about real-life issues, and discover ways of overcoming them. You will get to know new techniques for writing high-quality tests.

The goal of this book is to teach you how to write tests in such a way that all the effort you put into them really pays off!

100% real life

You won't find some fake hello-world examples which are nowhere near the real code.

I’ve decided to use only real-life examples in this book – things that I’ve actually witnessed in the code. I’ve searched around for recurring anti-patterns, and I’ve looked hard to identify common mistakes and suboptimal solutions. In this book I discuss them one by one, giving hints on how we could improve our tests.

I'm experienced - will I benefit?

No matter how much experience you’ve had, there’s always room for improvement.
See how others write tests, and benefit from the best practices presented in the book!
By applying the techniques discussed in the book, you can lower the maintenance costs associated with your tests.

I'm newbie - will I benefit?

In this short book you’ll find discussions of more than 20 patterns and anti-patterns connected with testing.
This book will help you avoid the dead ends and traps others have fallen victim to.
Learning from your own mistakes is great, but learning from the mistakes of others even better!

What people say

The anti-patterns discussed in this book, along with the suggestions for fixing them, will help you recognize problems you are writing into the tests and get the tests finding bugs again.
I am keeping this next to my copy of "Refactoring" by Fowler.

Read it now!

Paper version:

US   UK   DE
ES   IT   FR  

Kindle version:

Free PDF & EPUB:

Spread the word

Please use the buttons below to inform the world about this book.

It would be awesome if you could write a review and publish it on Amazon or your blog. Thank you!

About the Author

Hi there!

My name is Tomek Kaczanowski, and I’m happy to present to you the results of my hard work. This book have been written on the basis of my experience as a senior Java developer, trainer, mentor, technical team leader and merciless code reviewer. :)

The book have been proofread by several TDD & Java experts, and corrected by a native speaker, so I feel pretty confident about recommending it.

Personally, I would have been really happy to have had the chance to read book like this some time ago: it would have spared me several grey hairs, for sure! :) I would also be happy if my colleagues were to read them and follow the advice they would find there... :)

Twitter Google Plus Facebook Linkedin
Blog Books e-mail

A different book, perhaps?

Take a look at my other books. They are worth it.

Practical Unit Testing with JUnit and Mockito Practical Unit Testing with TestNG and Mockito 1,2,3 kanban

Source code

Some of the code presented in the book can be found online.