Series: Testing Techniques

8 posts in this series

Series: Testing Techniques

Practical techniques for better tests in .NET: test doubles, test data with Bogus and AutoFixture, test object patterns, database integration testing, Testcontainers, and more.

  1. Creating Test Objects via Design Patterns
    October 27, 2023

    When building objects in tests, there are 3 design patterns that assist with building test objects - Factory pattern, Object Mother, and Builder pattern.

  2. Supercharging Your Test Data With AutoFixture
    December 01, 2023

    AutoFixture generates test data for .NET so your Arrange code stays small. Learn the basics, customize it for your domain, and use it with xUnit.

  3. Creating Domain-Driven Test Data With Bogus
    December 12, 2023

    Generate realistic test data in .NET with Bogus, using its built-in data sets and custom rules to create domain objects for unit and integration tests.

  4. Boosting the Builder Pattern Using Bogus
    February 14, 2024

    Bogus and the Builder pattern join forces to simplify test data generation and improve the quality of your test suite.

  5. Effective Integration Testing with a Database in .NET: A Comprehensive Guide
    September 03, 2024

    Dive deep into .NET integration testing with databases. Explore EF Core providers, migrations, seeding, and strategies for reliable test suites.

  6. Understanding Test Doubles - Fakes, Stubs, Mocks, and Spies
    December 19, 2025

    Fakes, stubs, mocks, and spies are all test doubles, but they solve different problems. Learn what each one does and how to choose the right one for a test.

  7. Advanced Testing Techniques - Property-Based Testing, Contract Testing, and Test Doubles
    April 16, 2026

    Find bugs that example-based tests miss in .NET with property-based testing in FsCheck, contract testing with Pact-Net, and the right test doubles.

  8. Testcontainers in .NET: The Integration Testing Stack That Works Everywhere
    June 04, 2026

    Testcontainers spins up real database containers for your .NET integration tests — the same database version on every machine and every CI run, with no manual …