# shouldly/shouldly

Should testing for .NET—the way assertions should be!

Repository: https://github.com/shouldly/shouldly
Canonical: https://ross.abutalabs.com/products/shouldly
Homepage: https://docs.shouldly.org
Language: C#
License: NOASSERTION
License Family: other
Topics: assertion, testing, unit, should
Last push: 2026-08-26T16:25:12+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 8, longevity 100
- inputs: {"age_days": 5854, "days_push": 7, "days_rel": 587, "gap_med": null, "n_releases_24m": 1}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3408, forks 425 (observed 2026-08-28T04:08:03.213261+00:00)

## What it is
Shouldly is a .NET assertion library for unit tests that focuses on clear, expressive failure messages by embedding the asserted source expression into the error output. It works alongside test frameworks like NUnit and xUnit via simple Should* extension methods.

## Use cases
- write readable unit test assertions in C#
- get better failure messages than Assert.That
- migrate tests from FluentAssertions to Shouldly
- assert exceptions are thrown in tests
- compare strings and collections with helpful diffs
- snapshot/approved file testing with ShouldMatchApproved

## When to choose
- you write .NET unit tests and want terse, expressive assertions
- you care about diagnostic quality of test failure messages
- you're migrating away from FluentAssertions

## When to avoid
- you're not on the .NET platform
- you need fluent assertion chaining like .Should().Be()
- your build server can't provide full pdb files for source-based messages

## Facets
- artifact type: library
- maturity: active
- function: testing
- domain: testing, developer-tools
- platform: dotnet, cross-platform
- tags: assertions, unit-testing, fluent-assertions, nunit, xunit, error-messages

## Member repositories
- shouldly/shouldly (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:03.213261+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:38:33.377097+00:00, confidence not recorded.
  - readme: https://github.com/shouldly/shouldly (fetched 2026-08-28T04:08:03.213261+00:00, sha d5f6cfeb4929)
  - homepage: https://docs.shouldly.org (fetched 2026-08-29T09:32:39.334729+00:00, sha c21720b163a3)
  - site_page: https://docs.shouldly.org/documentation/getting-started (fetched 2026-08-29T09:32:39.343997+00:00, sha a18d82412b28)
  - site_page: https://docs.shouldly.org/documentation/migrating-from-fluentassertions (fetched 2026-08-29T09:32:39.345975+00:00, sha 7936a10f4c5c)
  - site_page: https://docs.shouldly.org/documentation/configuration (fetched 2026-08-29T09:32:39.348299+00:00, sha 471824cef8f2)
  - site_page: https://docs.shouldly.org/documentation/equality (fetched 2026-08-29T09:32:39.350589+00:00, sha bfa17eeb77ef)
  - site_page: https://docs.shouldly.org/documentation/string (fetched 2026-08-29T09:32:39.352783+00:00, sha acdcbdcb84b7)
  - site_page: https://docs.shouldly.org/documentation/enumerable (fetched 2026-08-29T09:32:39.354814+00:00, sha adc2c5afa0df)
  - site_page: https://docs.shouldly.org/documentation/dictionary (fetched 2026-08-29T09:32:39.356410+00:00, sha 2ed4d3546646)
  - site_page: https://docs.shouldly.org/documentation/exceptions (fetched 2026-08-29T09:32:39.358103+00:00, sha 7772602f093d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
