# AutoFixture/AutoFixture

AutoFixture is an open source library for .NET designed to minimize the 'Arrange' phase of your unit tests in order to maximize maintainability. Its primary goal is to allow developers to focus on what is being tested rather than how to setup the test scenario, by making it easier to create object graphs containing test data.

Repository: https://github.com/AutoFixture/AutoFixture
Canonical: https://ross.abutalabs.com/products/autofixture
Language: C#
License: MIT
License Family: permissive
Topics: assertion-library, assertions, auto-mocking, autofixture, dotnet, fakeiteasy, fscheck, moq, nsubstitute, nunit, test-data, test-data-generator, unit-testing, xunit, csharp, foq, fsharp, tdd, testing
Last push: 2026-07-31T16:10:42+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 60, longevity 100
- inputs: {"age_days": 5210, "days_push": 33, "days_rel": 33, "gap_med": 555, "n_releases_24m": 2}
- flags: prerelease_only
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3534, forks 356 (observed 2026-08-28T04:08:09.027084+00:00)

## What it is
AutoFixture is an open-source .NET library that automates the creation of test data and object graphs, minimizing the 'Arrange' phase of unit tests. It implements the Test Data Builder pattern so developers can focus on what is being tested rather than fixture setup.

## Use cases
- generate anonymous test data for unit tests in C#
- reduce boilerplate arrange phase in xUnit or NUnit tests
- create object graphs automatically for TDD
- integrate auto-mocking with Moq, NSubstitute, or FakeItEasy
- make unit tests refactoring-safe by avoiding hand-coded fixture values
- generate test fixtures for F# projects with FsCheck or Foq

## When to choose
- you write .NET unit tests and want to eliminate repetitive test setup code
- you practice TDD and need fast, maintainable fixture creation
- you want a generic Test Data Builder implementation with mocking library integration

## When to avoid
- your tests require precise, deterministic test data rather than anonymous values
- you are not working in the .NET ecosystem
- your project needs integration or end-to-end test tooling rather than unit test fixtures

## Facets
- artifact type: library
- maturity: stable
- function: testing, mocking, data-generation
- domain: testing, developer-tools
- platform: dotnet, cross-platform
- tags: test-data-builder, unit-testing, tdd, auto-mocking, anonymous-variables, csharp, fsharp, xunit, nunit, moq, nsubstitute, fakeiteasy, fscheck

## Member repositories
- AutoFixture/AutoFixture (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:09.027084+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:35:03.592533+00:00, confidence not recorded.
  - readme: https://github.com/AutoFixture/AutoFixture (fetched 2026-08-28T04:08:09.027084+00:00, sha 6ac9707ff3b6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
