Skip to content
CAI
Software that uses CAICheck a score

haf/expecto

53.9

Adequate · 13 November 2026

5.6k

lines of production code

F#

primary language

8

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Expecto is a .NET testing framework for F\# and C\# that provides a comprehensive suite for unit, property-based, and performance testing. It supports asynchronous execution, integrates with BenchmarkDotNet for performance analysis, and offers specialized extensions for Hopac jobs and FsCheck property testing. The system features robust assertion libraries with colored diff output and is designed to run on modern .NET versions with a flexible, extensible architecture.

How it got here

2012 — Migration to Expecto and .NET 10

5 changes.

The project underwent a major structural overhaul, migrating from the legacy Fuchu test framework to Expecto with support for .NET 10. This period involved removing obsolete Fuchu modules and documentation artifacts while modernizing the build infrastructure using FAKE and updating CI configurations. Additionally, security patches were applied to pin transitive dependencies and address known vulnerabilities.

2016 — Async support and ecosystem integration

5 changes.

The Expecto core library was restructured to introduce a C\#-friendly API and robust async test execution with cancellation support. This period also expanded the framework's ecosystem by adding dedicated integrations for FsCheck 3 and BenchmarkDotNet, alongside comprehensive sample projects and test coverage to validate these new capabilities.

2017–2018 — C\# support and Hopac integration

5 changes.

This period focused on expanding Expecto's ecosystem by adding native C\# test project support and integrating Hopac for Job-based asynchronous testing. Significant effort was also directed toward enhancing test coverage and performance validation through new benchmark suites and focused test verification.

2019–2026 — Usability and integration enhancements

4 changes.

This period focused on improving the developer experience through the introduction of Expecto.Diff for colored test output and the release of an Expecto .NET project template. It also expanded ecosystem compatibility by adding dedicated tests for FsCheck 3 integration and enhanced build flexibility with command-line argument support.

Features

C\# test project with async support and custom printers

A new C\# test project (Expecto.Tests.CSharp) has been added, demonstrating how to write Expecto tests in C\#. It includes a sample test suite covering standard, async, pending, and focused test cases, as well as a performance comparison using IsFasterThan. The project also introduces a custom ITestPrinter implementation (CSharpPrinter) to handle test lifecycle events and configures NUnit and JUnit XML output for test results.

Expecto.Tests.CSharp · high confidence

Expecto core library restructured with new C\# API and async support

The Expecto core library has been reorganized into multiple source files (Async.fs, CSharp.fs, Expect.fs, Expecto.Impl.fs, Expecto.fs, Flip.Expect.fs, Helpers.fs, Logging.fs, Model.fs, Performance.fs) to improve maintainability. This change introduces a new C\#-friendly API in the Expecto.CSharp namespace, providing extension methods for ExpectoConfig and wrapper functions for test cases (TestCase, PendingTestCase, FocusedTestCase) that support System.Threading.Tasks.Task and System.Func\<Task\>, making it easier for C\# users to write async tests. It also adds new async test execution functions (testCaseAsync, ftestCaseAsync, ptestCaseAsync) and improves the handling of async operations with cancellation support. The Expect module gains new assertion functions including throwsAsync, throwsAsyncC, throwsAsyncT, wantSome, isSome, wantOk, isOk, wantError, isError, wantCase, isCase, isNotNull, isNull, isLessThan, isLessThanOrEqual, isGreaterThan, isGreaterThanOrEqual, floatClose, float32Close, floatLessThanOrClose, float32LessThanOrClose, floatGreaterThanOrClose, float32GreaterThanOrClose, isNotNaN, isNotNaNf, isNotPositiveInfinity, isNotPositiveInfinityf, isNotNegativeInfinity, isNotNegativeInfinityf, isNotInfinity, isNotInfinityf, isNotEmpty, isEmpty, isNonEmpty, hasCountOf, isNotWhitespace, equal, isMatch, isRegexMatch, isMatchGroups, isMatchRegexGroups, isNotMatch, isNotRegexMatch, notEqual, isFalse, isTrue, exists, all, allEqual, contains, containsAll, and more. The test runner now supports afterRunTests hooks that are invoked after all tests complete, including on cancellation. The logging system has been updated with ANSI color support and improved message formatting.

Expecto · high confidence

Initial release of the Expecto .NET template

Users can now install and use the Expecto .NET template to scaffold new F\# test projects. The template provides a ready-to-run project structure including a Main.fs entry point and Sample.fs with example tests, installable via NuGet or locally, and includes documentation on usage, contribution, and packaging.

Expecto.Template · high confidence

Integration of BenchmarkDotNet for Expecto performance testing

The Expecto.BenchmarkDotNet package now provides a direct integration with BenchmarkDotNet, replacing previous custom or alternative benchmarking utilities. This change introduces a \BenchmarkDotNet\ module that exposes Expecto-compatible attributes (\BenchmarkAttribute\, \SetupAttribute\, \CleanupAttribute\) and a \BenchmarkConfig\ record type, allowing users to configure and run high-performance benchmarks using the BenchmarkDotNet engine within their Expecto test suites.

Expecto.BenchmarkDotNet · high confidence

Introduce Expecto.FsCheck3 integration for property-based testing

A new Expecto.FsCheck3 project has been added, providing a dedicated integration layer for FsCheck version 3. This allows users to write property-based tests using the latest FsCheck API while maintaining compatibility with the Expecto test runner. The implementation includes a custom runner to handle test lifecycle events (start, finish, shrink) and exposes configuration options for test counts, shrinking, and seed replay, effectively migrating the property-testing capabilities from the main Expecto package to a separate, version-specific module.

Expecto.FsCheck, Expecto.FsCheck3 · high confidence

Introduction of Expecto.Diff for colored side-by-side diffs

A new Expecto.Diff library has been added to provide side-by-side diff output with syntax coloring for test failures. This module leverages the DiffPlex library to generate colored diffs (green for insertions, red for deletions, blue for modifications) and integrates with Expecto's logging infrastructure via the ColourText module. Users can now utilize the \equals\ function to receive visually distinct, color-coded diff reports when assertions fail, improving the readability of test output.

Expecto.Diff · high confidence

New Expecto.Hopac integration for Job-based tests

A new Expecto.Hopac module has been added, providing a Hopac-specific test builder (TestJobBuilder) and helper functions (testJob, ftestJob, ptestJob) that allow users to write Expecto tests using Hopac's Job type. The implementation converts Hopac Jobs to Async for execution within the Expecto framework and includes support for focused and pending test states, mirroring the structure of Hopac's own JobBuilder.

Expecto.Hopac · high confidence

New sample projects demonstrating Expecto and Expecto.Flip testing capabilities

Added two new sample projects, Expecto.Sample and Expecto.Flip.Sample, which provide concrete examples of writing and running tests using the Expecto framework. Expecto.Sample demonstrates core features such as assertion helpers (isTrue, containsAll, equal), performance testing (isFasterThan), asynchronous tests, property-based testing with FsCheck, and custom diff colorization via Expecto.Diff. Expecto.Flip.Sample showcases the flipped API style for assertions. These samples serve as documentation and reference implementations for users adopting the library.

Expecto.Sample · high confidence

Repository remodeled to Expecto with .NET 10 support and modernized build infrastructure

The repository has been remodeled from the Fuchu project to Expecto, introducing a new solution structure (Expecto.sln) that includes the core Expecto library, extensions for BenchmarkDotNet, FsCheck, and Hopac, as well as dedicated test and sample projects. The project now targets .NET 10.0 (via global.json) and netstandard2.0, replacing the legacy Fuchu solution. Build and CI infrastructure has been modernized with a new FAKE-based build script (fake/fake.cmd), updated .travis.yml and appveyor.yml configurations, and the addition of .editorconfig and .gitattributes for consistent code formatting. Documentation has been significantly expanded with a comprehensive README, CONTRIBUTING guide, and release notes covering versions up to 11.1.1.

(repo-wide) · high confidence

Removals

Removal of FSharpx.Core XML documentation file

The XML documentation file for the FSharpx.Core library has been removed from the project. This change eliminates the generated documentation source for the library, which previously included definitions for components such as FSharpx.BS and FSharpx.FSharpFunc.

lib · high confidence

Removal of legacy Fuchu test framework module

The Fuchu.fs module, which provided the core test definition types (Test, TestCode, TestResult), execution logic (run, exec), and assertion helpers (assertEqual), has been removed from the codebase. This eliminates the legacy Fuchu test framework implementation, likely as part of a migration to a different testing infrastructure or repository structure.

Fuchu · high confidence

Security

Security patches for transitive dependencies

The build configuration now pins specific versions for System.Security.Cryptography.Pkcs, System.Text.Json, System.Formats.Asn1, and System.Security.Cryptography.Xml to address [CVE redacted], [CVE redacted], [CVE redacted], and [CVE redacted] respectively, ensuring these transitive dependencies are resolved to secure versions.

(dependencies) · high confidence

Behavioural changes

Build system now accepts command-line arguments

The build script (Build/Program.fs) has been updated to read and process command-line arguments, allowing users to pass specific options directly to the build process instead of relying solely on environment variables or hardcoded defaults.

Build · high confidence

Test coverage

Added Hopac integration tests; Added benchmark tests for serialiser performance; Added focused test discovery tests; Added test suite for Expecto test runner capabilities; New FsCheck3 integration test project; Removed legacy Fuchu test runner entry point.

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

How this codebase got here

Score

  • CAI 50 → 54 (+3.9)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 92 → 90 (-1.9)
  • Architecture 62 → 62 (-0.3)
  • Maturity 58 → 58 (+0.3)
  • Readiness 35 → 44 (+8.7)
  • Security 66 → 61 (-5.3)
  • Performance 74 → 82 (+8.3)

Resolved (7)

  • Coverage not measured — no coverage collector is wired up
  • Documentation: no architecture or design documentation (README.md)
  • IL efficiency: 8 authored method(s) exceed the IL budget (Expecto/TestResults.fs)
  • Off-boarding risk: anonymized user #1
  • Off-boarding risk: anonymized user #2
  • Vulnerable: System.Security.Cryptography.Pkcs
  • Vulnerable: System.Security.Cryptography.Xml

New (3)

  • Off-boarding risk: anonymized user #2
  • Off-boarding risk: anonymized user #1
  • Outdated: Iced

Architecture

  • Unchanged — 0 containers · 3 contexts · 0 edges

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

Survey your own repository

haf/expecto 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 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit dce19d6d9e83464bfab098c83af0cda76af737e9 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.61+preprod-b8b1a43ae4c3.