The best books to start your software developer journey with Test-Driven Development

Why am I passionate about this?

I’m a professional software developer for more than 22 years now. I’ve used many programming languages, platforms, frameworks, etc. throughout my career. However, the only constant for me personally was the practice of Test-Driven Development. I’ve never stopped learning about the principles and practices behind it, and it paid huge dividends throughout my career. I’m very humbled and grateful to be able to learn from all those amazing people over the years, that I decided to write a book on the topic. Giving back some of the knowledge that I gathered about TDD throughout 18+ years. 


I wrote...

Writing Maintainable Unit Tests: Mastering the Art of Loosely Coupled Unit Tests

By Jan Van Ryswyck,

Book cover of Writing Maintainable Unit Tests: Mastering the Art of Loosely Coupled Unit Tests

What is my book about?

The practice of Test-Driven Development has proven to be one of the major differentiators in writing quality software. Based on 15+ years of experience, this book is my attempt to teach about the heuristics that are involved when writing loosely coupled, maintainable and readable unit tests. 

Shepherd is reader supported. When you buy books, we may earn an affiliate commission.

The books I picked & why

Book cover of Test Driven Development: By Example

Jan Van Ryswyck Why did I love this book?

During the early years of my career as a software developer, I regularly developed very small programs that would exercise parts of the system that I was working on back then. I realized very quickly that those small programs would save me a lot of time figuring out whether the changes that I made would actually work or not. Until at some point a colleague mentioned the concept of Test-Driven Development. I first did some experimentation, dipping a toe into the water to feel the temperature. It wasn’t until the first time I picked up this book that I jumped right in. From then moment on, it all made sense. Although this book was published back in 2002, for me it still is the book when it comes to the subject of Test-Driven Development.      

By Kent Beck,

Why should I read it?

1 author picked Test Driven Development as one of their favorite books, and they share why you should read it.

What is this book about?

Quite simply, test-driven development is meant to eliminate fear in application development. While some fear is healthy (often viewed as a conscience that tells programmers to "be careful!"), the author believes that byproducts of fear include tentative, grumpy, and uncommunicative programmers who are unable to absorb constructive criticism. When programming teams buy into TDD, they immediately see positive results. They eliminate the fear involved in their jobs, and are better equipped to tackle the difficult challenges that face them. TDD eliminates tentative traits, it teaches programmers to communicate, and it encourages team members to seek out criticism However, even the…


Book cover of Growing Object-Oriented Software, Guided by Tests

Jan Van Ryswyck Why did I love this book?

I must admit that the first time I read this book, it completely didn’t resonate with me. Sure, I picked up a couple of very important concepts here and there. One of those concepts is the “Test Data Builder”. However, some of the techniques I completely rejected. It took me a couple of years to start opening up to the practices described in this book. After a second read, I came to the conclusion that this excellent work deserved more credit. That’s why I added it to this list. This book shaped my entire thinking around Outside-In TDD, which is a very important approach to guiding well-designed software systems.     

By Steve Freeman, Nat Pryce,

Why should I read it?

1 author picked Growing Object-Oriented Software, Guided by Tests as one of their favorite books, and they share why you should read it.

What is this book about?

Foreword by Kent Beck

"The authors of this book have led a revolution in the craft of programming by controlling the environment in which software grows." --Ward Cunningham

"At last, a book suffused with code that exposes the deep symbiosis between TDD and OOD. This one's a keeper." --Robert C. Martin

"If you want to be an expert in the state of the art in TDD, you need to understand the ideas in this book."--Michael Feathers

Test-Driven Development (TDD) is now an established technique for delivering better software faster. TDD is based on a simple idea: Write tests for your…


Book cover of Working Effectively with Unit Tests

Jan Van Ryswyck Why did I love this book?

I was quite late in picking up this book after it got published in 2014. Turned out that this mistake was all mine. Although the book is very opinionated, this masterpiece is filled with many nuggets of wisdom when it comes to writing highly maintainable unit tests. There are lots of code examples to be found as well. The ideal book to read after Test-Driven Development By Example and Growing Object-Oriented Software, Guided By Tests.

By Jay Fields,

Why should I read it?

1 author picked Working Effectively with Unit Tests as one of their favorite books, and they share why you should read it.

What is this book about?

This book details Jay Fields' strong opinions on the best way to test, while acknowledging alternative styles and various contexts in which tests are written. Whether you prefer Jay Fields' style or not, this book will help you write better Unit Tests.

From the Preface:

Over a dozen years ago I read Refactoring for the first time; it immediately became my bible. While Refactoring isn’t about testing, it explicitly states: If you want to refactor, the essential precondition is having solid tests. At that time, if Refactoring deemed it necessary, I unquestionably complied. That was the beginning of my quest…


Book cover of Agile Technical Practices Distilled: A learning journey in technical practices and principles of software design

Jan Van Ryswyck Why did I love this book?

This is the most recent book I'm recommending, and it’s also more than just a book on Test-Driven Development. I often proclaim that Test-Driven Development and software design are two sides of the same coin. One cannot separate one from the other. So learning about Test-Driven Development also means that one has to learn about software design principles. This book teaches both. The first part of the book is all about Test-Driven Development, while the remainder of the book also touches on object calisthenics, refactoring, code smells, design patterns, the S.O.L.I.D. principles, connascence, the four elements of simple design, and much more. Whether you’re new to programming software, or whether you’re a seasoned developer, there’s much to learn from this book.      

By Pedro M. Santos, Marco Consolaro, Alessandro Di Gioia

Why should I read it?

1 author picked Agile Technical Practices Distilled as one of their favorite books, and they share why you should read it.

What is this book about?

Delve deep into the various technical practices, principles, and values of Agile.

Key Features Discover the essence of Agile software development and the key principles of software design Explore the fundamental practices of Agile working, including test-driven development (TDD), refactoring, pair programming, and continuous integration Learn and apply the four elements of simple designBook Description

The number of popular technical practices has grown exponentially in the last few years. Learning the common fundamental software development practices can help you become a better programmer. This book uses the term Agile as a wide umbrella and covers Agile principles and practices, as…


Book cover of xUnit Test Patterns: Refactoring Test Code

Jan Van Ryswyck Why did I love this book?

This is the most complete and exhaustive reference book when it comes to test automation. It’s a massive book that’s got pretty much all bases covered: test patterns, test strategies, test smells, test practices, etc. … It’s all there. If you want to get a feel about what’s covered, check out the xUnit Test Patterns website. This book provides all the information to become an expert at all kinds of automated tests. It requires a lot of effort to process the content, but it’s definitely all worth it!

By Gerard Meszaros,

Why should I read it?

1 author picked xUnit Test Patterns as one of their favorite books, and they share why you should read it.

What is this book about?

Software testing has received renewed attention with the widespread adoption of Extreme Programming and other agile methodologies. While testing does not directly improve the quality of software, the under-appreciated practice provides a timely and accurate measurement (a reality check) so that the reader knows whether any new action needs to be taken. Automated software testing is used to ensure that once the software works, it is not accidentally broken during subsequent software development or maintenance activities. This book describes patterns for writing automated tests using the XUnit family (e.g., JUnit and NUnit) of test automation frameworks. The author uses the…


5 book lists we think you will like!

Interested in software, agile software development, and software development?

10,000+ authors have recommended their favorite books and what they love about them. Browse their picks for the best books about software, agile software development, and software development.

Software Explore 55 books about software
Agile Software Development Explore 18 books about agile software development
Software Development Explore 15 books about software development