Refurbished favorites for less
Enjoy fast, free delivery, exclusive deals, and award-winning movies & TV shows.
Buy new:
-30% $35.00
FREE delivery Sunday, December 7
Ships from: Amazon.com
Sold by: Amazon.com
Kindle app logo image

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.

QR code to download the Kindle App

First Chapter SummaryManning Publications-Veiled Access
  • VIDEO

Follow the author

Something went wrong. Please try your request again later.

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


{"desktop_buybox_group_1":[{"displayPrice":"$35.00","priceAmount":35.00,"currencySymbol":"$","integerValue":"35","decimalSeparator":".","fractionalValue":"00","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"FG2jYyfhyW%2BzkA4fmhy6Axj4TppWc%2FZCQYu6BPUugzJ84eVJQfXZMASIn7GVdoHS7B0gNZPWlulpR3ZMKB33QqSFL3f8lSWwoEM%2B04a%2Ff0pN2B4KPfI4VsQ50e5fLoU1%2Bx6IkJukfxnGQWdxUPQalw%3D%3D","locale":"en-US","buyingOptionType":"NEW","aapiBuyingOptionIndex":0}, {"displayPrice":"$28.96","priceAmount":28.96,"currencySymbol":"$","integerValue":"28","decimalSeparator":".","fractionalValue":"96","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"FG2jYyfhyW%2BzkA4fmhy6Axj4TppWc%2FZCV%2BE%2BxgQBH1iBpegeroIrS1XkIEAZpGl1aageujnrPBAvYE9dT8NdkOxHeO1XT6M%2BGTlhBcwt8zC1LC0jzoqgo4Cfc8cK4kOML0%2BPfGHesiAUYGfJx5aEYbxckm%2B3qGfpCrR8CZ3LsKlDuDSvU0oG7A%3D%3D","locale":"en-US","buyingOptionType":"USED","aapiBuyingOptionIndex":1}]}

Purchase options and add-ons

Radically improve your testing practice and software quality with new testing styles, good patterns, and reliable automation.

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

Frequently bought together

This item: Unit Testing Principles, Practices, and Patterns: Effective testing styles, patterns, and reliable automation for unit testing, mocking, and integration testing with examples in C#
$34.50
Get it as soon as Tuesday, Dec 9
Sold by RumiLLC and ships from Amazon Fulfillment.
+
$46.26
Only 14 left in stock - order soon.
Ships from and sold by WhitePaper Books.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
Some of these items ship sooner than the others.
Choose items to buy together.

Customers also bought or read

Loading...

Editorial Reviews

Review

"This book is an indispensable resource."--Greg Wright, Kainos Software Ltd."Serves as a valuable and humbling encouragement to double down andtest well, something we need no matter how experienced we may be."--Mark Nenadov, BorderConnect"I wish I had this book twenty years ago when I was starting mycareer in software development.--Conor Redmond, Incomm Product Control"This is the kind of book on unit testing I have been waiting on fora long time."--Jeremy Lange, G2

About the Author

Vladimir Khorikov is the author of Unit Testing Principles, Practices, and Patterns, Pluralsight author, and Microsoft MVP. He has mentored numerous teams on the ins and outs of unit testing.

Product details

About the author

Follow authors to get new release updates, plus improved recommendations.
Vladimir Khorikov
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

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

4.7 out of 5 stars
227 global ratings

Customers 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.

5 customers mention "Information quality"5 positive0 negative

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

3 customers mention "Unit testing"3 positive0 negative

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

  • Reviewed in the United States on January 22, 2025
    Format: PaperbackVerified Purchase
    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 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, 2022
    Format: KindleVerified Purchase
    I 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.
    11 people found this helpful
    Report
  • Reviewed in the United States on April 25, 2025
    Format: PaperbackVerified Purchase
    One of the fundamental books in unit testing. Get it!
  • Reviewed in the United States on October 28, 2021
    Format: PaperbackVerified Purchase
    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 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.
    3 people found this helpful
    Report
  • Reviewed in the United States on February 3, 2020
    Format: PaperbackVerified Purchase
    Bob 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.
    21 people found this helpful
    Report
  • Reviewed in the United States on September 16, 2020
    Format: PaperbackVerified Purchase
    This 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!!!!
    3 people found this helpful
    Report
  • Reviewed in the United States on February 4, 2020
    Format: PaperbackVerified Purchase
    This book contains many great advices and examples about different aspects of unit testing. Very helpful for me.
    2 people found this helpful
    Report
  • Reviewed in the United States on December 6, 2024
    Format: Paperback
    Great 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

  • TimoHeiten
    5.0 out of 5 stars Learn to write better tests. The Book delivers and is a Good read
    Reviewed in Germany on September 27, 2020
    Format: PaperbackVerified Purchase
    Excellent 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.
  • rajasekhar
    5.0 out of 5 stars The best comprehensive book on testing
    Reviewed in India on October 9, 2021
    Format: KindleVerified Purchase
    A 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 Obeso
    5.0 out of 5 stars Excelente libro
    Reviewed in Mexico on July 30, 2025
    Format: PaperbackVerified Purchase
    Excelente libro
  • Farnoosh
    5.0 out of 5 stars Fabulous
    Reviewed in Canada on October 8, 2023
    Format: PaperbackVerified Purchase
    One of the best books I've ever read, excellent content
  • Daniel Akio Teixeira
    5.0 out of 5 stars Excelente livro
    Reviewed in Brazil on September 4, 2022
    Format: KindleVerified Purchase
    Me 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!