DEV Community

Jan Van Ryswyck
Jan Van Ryswyck

Posted on • Originally published at principal-it.eu on

Book Launch: Writing Maintainable Unit Tests

I’m very happy to announce that I’ve finished writing my first book Writing Maintainable Unit Tests. What an amazing journey it has been. I would never have thought that I would be able to write a book. Well now, here we are.

Book cover of 'Writing Maintainable Unit Tests'

The ebook has been published on LeanPub, which is available in PDF, EPUB and MOBI formats. There are six chapters:

  • Chapter 1 provides an overview of the different kinds of automated tests and how to apply a healthy mix in a code base. It also touches on the different flavours of Test-Driven Development.
  • Chapter 2 describes the characteristics and principles that make tests maintainable. It touches on a number of design principles like DRY, DAMP and the Single-Responsibility Principle.
  • Chapter 3 discusses the anatomy of automated tests and how a good structure is essential to keep them readable for our fellow software developers.
  • Chapter 4 demonstrates a number of patterns and techniques to keep tests decoupled from the production code. This is the longest chapter of the book.
  • Chapter 5 shows a number of patterns and techniques for writing clear assertions and observations.
  • Chapter 6 touches on some miscellaneous principles that are useful for writing maintainable and readable tests.

For more information, you can have a look at the full table of contents.

I’ve learned a lot over these past couple of years. It’s my hope that others can learn something as well from reading this book. As always, any and all feedback is very much appreciated.

Top comments (0)