Buy new:
-30% $35.00$35.00
FREE delivery Sunday, December 7
Ships from: Amazon.com Sold by: Amazon.com
Save with Used - Good
$28.96$28.96
FREE delivery December 10 - 12
Ships from: ThriftBooks-Dallas Sold by: ThriftBooks-Dallas
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Image Unavailable
Color:
-
-
-
- To view this video download Flash Player
-
-
VIDEO -
Follow the author
OK
Unit Testing Principles, Practices, and Patterns: Effective testing styles, patterns, and reliable automation for unit testing, mocking, and integration testing with examples in C# First Edition
Purchase options and add-ons
Key Features
A practical and results-driven approach to unit testing
Refine your existing unit tests by implementing modern best practices
Learn the four pillars of a good unit test
Safely automate your testing process to save time and money
Spot which tests need refactoring, and which need to be deleted entirely
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About The Book
Great testing practices maximize your project quality and delivery speed by identifying bad code early in the development process. Wrong tests will break your code, multiply bugs, and increase time and costs. You owe it to yourself—and your projects—to learn how to do excellent unit testing.
Unit Testing Principles, Patterns and Practices teaches you to design and write tests that target key areas of your code including the domain model. In this clearly written guide, you learn to develop professional-quality tests and test suites and integrate testing throughout the application life cycle. As you adopt a testing mindset, you’ll be amazed at how better tests cause you to write better code.
What You Will Learn
Universal guidelines to assess any unit test
Testing to identify and avoid anti-patterns
Refactoring tests along with the production code
Using integration tests to verify the whole system
This Book Is Written For
For readers who know the basics of unit testing. Examples are written in C# and can easily be applied to any language.
About the Author
Vladimir Khorikov is an author, blogger, and Microsoft MVP. He has mentored numerous teams on the ins and outs of unit testing.
Table of Contents:
PART 1 THE BIGGER PICTURE
1 ¦ The goal of unit testing
2 ¦ What is a unit test?
3 ¦ The anatomy of a unit test
PART 2 MAKING YOUR TESTS WORK FOR YOU
4 ¦ The four pillars of a good unit test
5 ¦ Mocks and test fragility
6 ¦ Styles of unit testing
7 ¦ Refactoring toward valuable unit tests
PART 3 INTEGRATION TESTING
8 ¦ Why integration testing?
9 ¦ Mocking best practices
10 ¦ Testing the database
PART 4 UNIT TESTING ANTI-PATTERNS
11 ¦ Unit testing anti-patterns
- ISBN-101617296279
- ISBN-13978-1617296277
- EditionFirst Edition
- PublisherManning
- Publication dateJanuary 14, 2020
- LanguageEnglish
- Dimensions7.38 x 0.7 x 9.25 inches
- Print length304 pages
Frequently bought together

What do customers buy after viewing this item?
Lowest Price
in this set of products
Most purchased | Highest rated
in this set of products
The Pragmatic Programmer: Your Journey To Mastery, 20th Anniversary Edition (2nd Edition)David ThomasHardcoverFREE Shipping by AmazonGet it as soon as Monday, Dec 8Only 3 left in stock (more on the way).
Effective Software Testing: A developer's guidePaperbackFREE Shipping by AmazonGet it as soon as Sunday, Dec 7
Design Patterns: Elements of Reusable Object-Oriented SoftwareHardcoverFREE Shipping by AmazonGet it as soon as Sunday, Dec 7
Refactoring: Improving the Design of Existing Code (2nd Edition) (Addison-Wesley Signature Series (Fowler))HardcoverFREE Shipping by AmazonGet it as soon as Sunday, Dec 7
Head First Design Patterns: Building Extensible and Maintainable Object-Oriented Software 2nd EditionPaperbackFREE Shipping by AmazonGet it as soon as Sunday, Dec 7
Domain-Driven Design: Tackling Complexity in the Heart of SoftwareHardcoverFREE ShippingOnly 14 left in stock - order soon.
Clean Code: A Handbook of Agile Software CraftsmanshipPaperbackFREE Shipping on orders over $35 shipped by AmazonGet it as soon as Sunday, Dec 7
Building Microservices: Designing Fine-Grained SystemsPaperbackFREE Shipping by AmazonGet it as soon as Sunday, Dec 7
Customers also bought or read
- Domain-Driven Design: Tackling Complexity in the Heart of Software
Hardcover$46.26$46.26FREE delivery Thu, Dec 11 - Clean Architecture: A Craftsman's Guide to Software Structure and Design (Robert C. Martin Series)
Paperback$25.51$25.51FREE delivery Fri, Dec 12 - Head First Design Patterns: Building Extensible and Maintainable Object-Oriented Software 2nd Edition
Paperback$43.99$43.99FREE delivery Sunday - Design Patterns: Elements of Reusable Object-Oriented Software
Hardcover$35.13$35.13FREE delivery Sunday - The Pragmatic Programmer: Your Journey To Mastery, 20th Anniversary Edition (2nd Edition)#1 Best SellerSoftware Testing
Hardcover$35.59$35.59FREE delivery Mon, Dec 8 - Fundamentals of Software Architecture: An Engineering Approach#1 Best SellerSoftware Design Tools
Paperback$55.94$55.94FREE delivery Sunday - Software Engineering at Google: Lessons Learned from Programming Over Time
Paperback$32.82$32.82Delivery Sunday - Code Complete#1 Best SellerClient-Server Networking Systems
Paperback$40.01$40.01FREE delivery Sunday - Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation (Addison-Wesley Signature Series (Fowler))
Hardcover$28.37$28.37FREE delivery Thu, Dec 11 - Structure and Interpretation of Computer Programs - 2nd Edition (MIT Electrical Engineering and Computer Science)#1 Best SellerSoftware Programming Compilers
Paperback$53.41$53.41FREE delivery Sat, Jan 3 - Patterns of Enterprise Application Architecture#1 Best SellerComputer Hardware Design
Hardcover$53.03$53.03FREE delivery Thu, Dec 11 - The Art of Unit Testing, Third Edition: with examples in JavaScript
Paperback$40.99$40.99FREE delivery Sunday - Code That Fits in Your Head : Heuristics for Software Engineering (Robert C. Martin Series)
Paperback$31.60$31.60Delivery Sunday - Build a Large Language Model (From Scratch)#1 Best SellerComputer Neural Networks
Paperback$44.06$44.06FREE delivery Sunday - Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices
Paperback$37.10$37.10FREE delivery Sunday - Modern Software Engineering: Doing What Works to Build Better Software Faster#1 Best SellerProject Management Software Books
Paperback$23.40$23.40Delivery Sunday
Editorial Reviews
Review
About the Author
Product details
- Publisher : Manning
- Publication date : January 14, 2020
- Edition : First Edition
- Language : English
- Print length : 304 pages
- ISBN-10 : 1617296279
- ISBN-13 : 978-1617296277
- Item Weight : 1.1 pounds
- Dimensions : 7.38 x 0.7 x 9.25 inches
- Best Sellers Rank: #210,504 in Books (See Top 100 in Books)
- #6 in C# Programming (Books)
- #21 in Software Testing
- #152 in Software Development (Books)
- Customer Reviews:
Product Videos
About the author

Vladimir Khorikov is a software engineer and author of several popular Pluralsight courses. He has been professionally involved in software development for over 15 years, including mentoring teams on the ins and outs of unit testing.
He's also the founder of the Enterprise Craftsmanship blog, where he reaches 500 thousand software developers yearly. He started as an adviser on general programming topics, but lately shifted his focus to unit testing with a central message of teaching software developers how to make unit testing painless.
The biggest advantage of his teaching style, and the one students often praise, is his tendency to have a strong theoretic background, which he then applies to practical examples.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Customers find the book's information quality positive, with one noting it contains many great advices. The book receives positive feedback for its unit testing content, with one customer describing it as the best book on how to make software testable.
AI Generated from the text of customer reviews
Select to learn more
Customers find the book's information quality positive, with one customer noting it contains many great advices and another describing it as a fundamental book in unit testing.
"...I think that there is so much information in this book that reading it once might not be enough, and I'm going to read it a second time and use it..." Read more
"One of the most helpful resources I found when it comes to test effectively, beyond the "The more test the better" rule of thumb the main take away..." Read more
"One of the fundamental books in unit testing. Get it!" Read more
"This book contains many great advices and examples about different aspects of unit testing. Very helpful for me." Read more
Customers appreciate the book's coverage of unit testing, with one customer noting it takes the topic to the next level, while another mentions it provides examples about different aspects of unit testing and explains how to make software testable.
"Unit tests are a necessary for complex software applications, but there are very few guidelines and resources on how and what exactly should be unit..." Read more
"This book contains many great advices and examples about different aspects of unit testing. Very helpful for me." Read more
"The best book on how to make software testable..." Read more
Top reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on January 22, 2025Format: PaperbackVerified PurchaseOne of the most helpful resources I found when it comes to test effectively, beyond the "The more test the better" rule of thumb the main take away from this book is "You either create solid tests that brings value to your software or you wrote none" The approach of how to calculate the value of a tests is quite accurate. Test quality that can be measure is something really valuable.
- Reviewed in the United States on March 16, 2022Format: KindleVerified PurchaseI have been doing unit and integration testing for about fifteen years, and I have read many books about testing using different languages. This book so far is the best. Most of the books gave simple examples like calculators or dependency injection. This book covered where and how to use each and design your code to be testable. That is very important since testable code requires a different structure or architecture. This book also covers dealing with mock, databases, external services. I think that there is so much information in this book that reading it once might not be enough, and I'm going to read it a second time and use it as a reference when I'm designing and writing my code to make writing unit tests better.
- Reviewed in the United States on April 25, 2025Format: PaperbackVerified PurchaseOne of the fundamental books in unit testing. Get it!
- Reviewed in the United States on October 28, 2021Format: PaperbackVerified PurchaseUnit tests are a necessary for complex software applications, but there are very few guidelines and resources on how and what exactly should be unit tested. This book takes unit testing at the next level. I completely agree with the author, we should unit test a unit of behavior and not a unit of code. I highly recommend this book for all software developers.
- Reviewed in the United States on February 3, 2020Format: PaperbackVerified PurchaseBob is young and just started writing unit tests because he has heard it's such a great idea, he picked the "art of unit testing" book from bookshelf and he is ready to go, writes many tests, he is more than happy, finally, something checks his job, he is not afraid anymore to bug fix code because something is checking if he is not introducing any new bugs. Then, this day comes, Bob wants to rearrange his classes, methods and suddenly he is in a situation when he has to fix a million tests. Don't be like Bob, do a favor to yourself and buy this book.
- Reviewed in the United States on September 16, 2020Format: PaperbackVerified PurchaseThis book is amazing! As usual Vladimir is super clear snd pragmatic. This is not only about unit testing, but architecture as well. I personally loved it!!!!
- Reviewed in the United States on February 4, 2020Format: PaperbackVerified PurchaseThis book contains many great advices and examples about different aspects of unit testing. Very helpful for me.
- Reviewed in the United States on December 6, 2024Format: PaperbackGreat book, explains various theoratical concepts around unit tests. I'm keeping this as my reference, or source to make software training about unit testing.
Top reviews from other countries
TimoHeitenReviewed in Germany on September 27, 20205.0 out of 5 stars Learn to write better tests. The Book delivers and is a Good read
Format: PaperbackVerified PurchaseExcellent Book on Unit testing pcrinciples. But be aware that you Need already be comfortable with the technical Side of testing.
Other than that the Book very clearly explains how to Write Good Unit tests that will help you have a refactoring Safety net for your application.
This is done by elaborating on the 4 pillars of good tests and the difference between different unit test schools and styles.
To sum it up it is an excellent read and I learnt a lot, I have not been aware of before even though I practiced TDD and testing in general. So buy it if you want to write better tests is my advice.
rajasekharReviewed in India on October 9, 20215.0 out of 5 stars The best comprehensive book on testing
Format: KindleVerified PurchaseA great book for writing unit tests. The book has given clear picture of writing best testing. I truly thankful to author writing this book.
José Enrique López ObesoReviewed in Mexico on July 30, 20255.0 out of 5 stars Excelente libro
Format: PaperbackVerified PurchaseExcelente libro
FarnooshReviewed in Canada on October 8, 20235.0 out of 5 stars Fabulous
Format: PaperbackVerified PurchaseOne of the best books I've ever read, excellent content
-
Daniel Akio TeixeiraReviewed in Brazil on September 4, 20225.0 out of 5 stars Excelente livro
Format: KindleVerified PurchaseMe interessei pelo livro, após perder horas do meu dia tentando entender qual seria o melhor jeito de criar testes automatizados de uma forma simples e efetiva.
O livro explica de forma clara e exemplificada os tópicos que são abordados.
Após ler o livro e aplicar as soluções recomendadas, consigo construir testes que acrescentam e muito na vida útil do meu software!






















![FSOT Study Cards 2025-2026: FSOT Exam Prep and Practice Questions for the Foreign Service Officer Test [Full Color Cards]](https://cdn.statically.io/img/m.media-amazon.com/images/I/31qIxkINAOL._AC_SR100,100_QL65_.jpg)
![Police Officer Exam Study Guide 2025-2026: Full Practice Test, Chapter Review Questions, Detailed Answer Explanations, and Prep Book: [6th Edition]](https://cdn.statically.io/img/m.media-amazon.com/images/I/51ptyJRxk+L._AC_SR100,100_QL65_.jpg)