Skip to content
CAI
Software that uses CAICheck a score

fsprojects/FsUnit

53.8

Weak · 23 September 2026

1k

lines of production code

F#

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

FsUnit is a functional testing library for F\# that provides a domain-specific language for writing assertions in unit tests. It offers integrations for NUnit, xUnit, and MSTest, allowing developers to use expressive syntax like \should\ and \equal\ across multiple testing frameworks. The system has been modernized to target .NET 6.0 and NetStandard2.0, with dependencies managed via Paket, while removing support for older frameworks and legacy test adapters.

Features

Added shared implementation for union case checking and PowerShell install script

The FsUnit library now includes a shared implementation for checking union cases, introducing the \isUnionCase\ helper and the \caseName\ and \isOfCase\ functions in \src/Common.fs\ to support pattern matching on F\# union types. Additionally, a PowerShell installation script (\src/install.ps1\) was added to handle binding redirects during package installation.

src · medium confidence

FsUnit.NUnit updated to version 7.1.1 with new assertion operators

The FsUnit.NUnit package has been updated to version 7.1.1, introducing several new assertion operators for unit testing. Users can now use \ofCase\ to assert union case equality, \supersetOf\ and \subsetOf\ for collection constraints, and \inRange\ for range checks. The \should\ operator now supports lambda expressions for exception testing, and \throwWithMessage\ allows matching exception messages. Additionally, \equalSeq\ and \equivalent\ provide sequence comparison capabilities, while \haveSubstring\, \endWith\, and \startWith\ add string constraint support.

src/FsUnit.NUnit · high confidence

Introduce FsUnit.MsTestUnit integration

Users can now use FsUnit's functional testing syntax (such as \should\, \equal\, \throw\, and various matchers) within Microsoft Visual Studio Test (MsTest) projects. This new package provides a bridge between FsUnit and the MsTest framework, allowing developers to write assertions using FsUnit's domain-specific language while still using MsTest's test runner and attributes.

src/FsUnit.MsTestUnit · high confidence

Removals

Removed FsUnit.NUnit NuGet package and sample files

The FsUnit.NUnit NuGet package and its associated sample files (FsUnitSample.fs.pp, FsUnit.nuspec, build.bat) have been removed from the repository. This eliminates the legacy NUnit 2.5.10.11091 dependency and the bundled example code for that specific package.

NuGet/FsUnit.NUnit, NuGet/FsUnit.xUnit · high confidence

Removed obsolete MbUnit and NUnit test suites

The \FsUnit.MbUnit\ and \FsUnit.NUnit\ test projects have been removed from the codebase. This includes all associated test files (such as \beEmptyTests.fs\, \equalTests.fs\, and \containTests.fs\), build artifacts, and configuration files. This change eliminates the legacy test infrastructure for these specific frameworks, likely as part of a broader effort to modernize the testing stack or remove deprecated dependencies.

SourceCode · high confidence

Removed obsolete MbUnit support from FsUnit

The FsUnit package for MbUnit has been removed from the repository. This includes the associated NuGet specification file, the build script, and the sample F\# test code. Users relying on MbUnit will no longer receive updates or support for this testing framework.

NuGet/FsUnit.MbUnit · high confidence

Behavioural changes

2 commits (0 fixes) modifying (repo-wide)

A change to existing behaviour in (repo-wide) — 2 commits, 1447 files.

(repo-wide) · medium confidence · unverified

Modernized build system and project structure

The project has been modernized by migrating the build system from FAKE 1.58 to FAKE 5.23.1, which updates the build script to use .NET 6.0 and Paket for dependency management. The solution file has been restructured to organize projects into 'src' and 'tests' folders, and the build script now uses the modern \dotnet fake\ tooling. Additionally, the license header was updated to the MIT license, and the README was refreshed with current maintainer information.

(repo-wide) · high confidence

Removal of NUnit example files

The repository has removed the NUnit-based example files (BowlingGame, Euler Problem 1, and LightBulb) from the Examples directory. These Fsx scripts, which previously demonstrated test cases using the NUnit framework and FsUnit assertions, are no longer included in this location.

Examples · high confidence

Removed Mercurial version control files

The repository has been migrated away from the Mercurial version control system. All Mercurial-specific metadata and configuration files (such as .hg/branch, .hg/hgrc, and .hg/store) have been deleted from the project root, leaving the repository ready for a different source control system.

(repo-wide) · high confidence

Removed bundled NHamcrest license file

The local copy of the NHamcrest license file (lib/NHamcrest\_License.html) has been removed from the repository. This reflects the shift to restoring the library via NuGet, meaning the license is now managed by the package manager rather than being distributed as a static file in the source tree.

lib · high confidence

Removed obsolete FAKE.Git documentation files

The HTML documentation files for the FAKE.Git namespace have been removed. This includes pages for Branches, CommandHelper, CommitMessage, FileStatus, Information, Merge, MergeType, Rebase, Repository, and Reset. These files were part of the FAKE package's generated documentation and their removal indicates a cleanup or restructuring of the documentation assets.

SourceCode/packages/FAKE.1.58.10, SourceCode/packages/mbunit.3.3.454.0, SourceCode/packages/xunit.1.8.0.1549 · high confidence

Removed obsolete XML documentation files from the build directory

The build process no longer generates or includes the XML documentation files for FsUnit.MbUnit, FsUnit.NUnit, and FsUnit.xUnit. These files, which previously contained API documentation for the .NET 2.0 and 4.0 builds, have been deleted from the repository, indicating a shift away from maintaining or distributing these specific documentation artifacts in the build output.

build · high confidence

Test coverage

Add MsTest unit tests for FsUnit assertions; Expanded test coverage for FsUnit.NUnit.Test; Expanded test coverage for FsUnit.Xunit assertions.

Dependencies

Migrated to Paket and modernized .NET 6.0/NetStandard2.0 build system

The project has migrated from the legacy MSBuild-based build system to a modern .NET SDK-style project structure, targeting .NET 6.0 and NetStandard2.0. Dependencies are now managed via Paket, with \paket.dependencies\ and \paket.lock\ files introduced to pin specific versions of key libraries including FSharp.Core (\~\> 5.0.0), NUnit (\~\> 4.0.0), xUnit (v3 1.0.0), and MSTest (3.6.0). This change replaces the previous \packages.config\-based NuGet management and removes support for older frameworks like .NET 3.5 and 4.0, streamlining the build process for the FsUnit testing library.

(dependencies) · high confidence

Upgrade xUnit dependency to v3

The FsUnit.Xunit package now targets xUnit v3, as indicated by the new \paket.references\ and \paket.template\ files which explicitly list \xunit.v3\ as a dependency. This change updates the underlying testing framework integration, requiring users to ensure their projects are compatible with the newer xUnit version.

src/FsUnit.Xunit · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 54 → 54 (+0.2)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 95 → 73 (-21.6)
  • Architecture 69 → 69 (+0.0)
  • Maturity 34 → 34 (+0.0)
  • Readiness 61 → 74 (+13.7)
  • Security 100 → 79 (-21.4)

Resolved (7)

  • Dependency hygiene not measured — no packages were read
  • Duplicated block (17 lines × 2) (src/FsUnit.MsTestUnit/FsUnit.fs)
  • Duplicated block (9 lines × 2) (src/FsUnit.MsTestUnit/FsUnit.fs)
  • No exposed public API
  • Test reliability not included
  • complexity unreadable for .fs — churn × complexity hotspots could not be measured
  • dormant codebase — no living knowledge left to concentrate

New (16)

  • Documentation: hard to navigate (docs/_template.html)
  • Documentation: hard to navigate (docs/operators.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (79 lines × 2) (src/FsUnit.MsTestUnit/FsUnit.fs)
  • Duplicated block (9–10 lines × 2) (src/FsUnit.MsTestUnit/FsUnit.fs)
  • End-of-life runtime: .NET net6.0
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Test reliability not measured — test suite did not build
  • TooManyFunctions: CustomMatchers (src/FsUnit.Xunit/CustomMatchers.fs)
  • TooManyFunctions: TopLevelOperators (src/FsUnit.NUnit/FsUnit.fs)
  • TooManyFunctions: Xunit (src/FsUnit.Xunit/FsUnit.fs)
  • Workflow token permissions not restricted

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

fsprojects/FsUnit was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 9e69d1c7c5455448b2adf4c02230e25f17b27916 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.