Unit Testing book
From the author
I come from a mathematical background and strongly believe that guidelines in programming, like theorems in math, should be derived from first principles. I've tried to structure this book in a similar way: start with a blank slate by not jumping to conclusions or throwing around unsubstantiated claims, and gradually build my case from the ground up.
I intended this book as the complete guide to unit testing: a practical, start-to-finish blueprint for approaching the subject.
What software developers are saying
This book covers about any question you could have about unit tests, from what to test about database calls to whether or not you test what you log.
In my mind this is a great design book under the guise of a unit testing book. Don’t get me wrong. The author goes to great lengths on unit testing, why you should do it, and how to identify and write good tests. But the real heart of this book is on how to structure your code to unit test effectively. There’s a lot of value in that that a lot of resources don’t explore.
– Jeremy Lange
Absolutely practical and useful book. The author can convey his ideas in a consistent and pragmatic way, with all the necessary underlying theory and without architecture astronaut’s solutions.
The examples in the book are really perfect. The test application’s idea is dead simple, so everybody can understand the domain, read the code without C# knowledge. But with the help of slight modifications, the author illustrates the main ideas of the different chapters. So I’m especially grateful to the author for being able to write such a book without unnecessary complexity.
– Vladimir Kuptsov, Lead Software Engineer, Reddit
This is a book that every developer and software architect should read. You’ll probably find yourself reading it again and again and getting more out of it each time. It will feed into your professional practice and make you a better developer. Writing better unit tests forces you to become a better software architect. This book is an indispensable resource.
– Greg Wright, Technical Architect, Kainos Software Ltd.
Now, that’s what I call modern approach to unit testing. Precise, easy to understand, and engaging explanations of concepts essential to create robust software. You feel your brain growing as you progress through chapters and you will never look at unit testing the same way.
A true software craftsman cannot ignore the techniques in this book.
– Sumant Tambe, Sr. Software Engineer, Linkedin
A book on Unit Testing that will stand the test of time! This book is sure to be classic, a must-read for anyone willing to create value and increase return on investment in Unit Testing.
– Srihari Sridharan, Principal Member of Technical Staff, athenahealth
This book will not only help you write better tests but more importantly will help you write code that is more easily testable. I wish I had this book twenty years ago when I was starting my careen in software development.
– Conor Redmond, Project Manager, Incomm Product Control
This book should be read by all developers. It provides the type of content that you have to read between the lines of many other books and puts into words things that are often intuited. This book will give you a new perspective on unit testing; you will become much better at judging the quality of a test and subsequently improving your tests and your software.
– T.J. van Deurzen
I discovered the unit testing concept early on in my career and have used it as much as I can. I never felt like I knew it well enough. I have researched the subject, tried to practice as much as I could. But it never felt like I was doing it properly. Reading this book have made me think I might know why that has occurred. Partly, I think it is due to not appreciating how much the overall design of your code impacts the unit tests you write.
The other reason is not having a way to recognize problems. So much of what software developers do is to recognize patterns and communicate them effectively. I admire how effortless the author makes this seem. Sharing a common understanding of the issues/problems with our unit testing practices is the first and probably most important step in improving and growing as developers. With all this now in my hands, I feel like I can start on a path to better unit testing practices and providing more value to my clients.
– Matthew Edgar, https://twitter.com/edgamat