Learn unit testing through a catalog of bad Test smells.


You begin to embrace unit testing but you feel your tests do not deliver all its promises? With Effective Unit Testing, you will learn how to write effective unit tests by learning to detect bad smells.

The book is divided in three parts. Part one sets the foundations: why good tests are so important, what defines a good tests, and why test doubles are essential. Part two is the core of the book. A catalogue of bad smells organized around good tests qualities: readability, maintainability and trustworthiness. I particularly enjoyed the presentation. Each smell is illustrated with a “Don’t do that” example before being refactored. The examples are well-chosen, easy to grasp, yet subtle enough to illustrate real-world code. Part three discusses various topics like what makes a testable design, how to write tests in other JVM languages (examples used Groovy) and how to speed the thousands of tests you have write thanks to this book.

Effective Unit Testing is not about how to test-drive your code. If want to learn more about TDD, BDD or Acceptance testing, I recommend you Test-Driven, of the same author. But if you have written a dozen of unit tests already, and want to improve them without learning the hard way, Effective Unit Testing is the way to go.

About the author

Julien Sobczak works as software developer for Scaleway, a French cloud provider. As an avid reader, his main area of focus are developer productivity, mental literacy, and everything that resolves around personal development.

Read Full Profile

Tags