haf/expecto
57.1
Adequate · 23 September 2026
5.5k
lines of production code
F#
primary language
5
measurements over time
What this system is
This system is the Expecto testing framework for .NET, providing a comprehensive suite for writing and executing unit, integration, and performance tests. It supports multiple testing paradigms, including property-based testing via FsCheck, asynchronous testing with Hopac, and benchmarking with BenchmarkDotNet. The framework offers a C\#-friendly API and colorized diff output for improved test failure readability. The codebase has been modernized to .NET 10.0, with legacy components like Fuchu removed.
How it got here
2012 — Modernization and infrastructure cleanup
5 changes.
This period focused on modernizing the project's build infrastructure by migrating to .NET 10.0 and updating CI/CD configurations. Simultaneously, obsolete test modules and documentation files were removed to streamline the codebase.
2016 — C\# integration and ecosystem expansion
5 changes.
This period focused on expanding Expecto's compatibility with C\# and the broader .NET ecosystem. The team introduced a dedicated C\#-friendly API, added support for async tests, and integrated with FsCheck and BenchmarkDotNet to enhance property-based and performance testing capabilities.
2017–2018 — multi-language and async test support
5 changes.
This period focused on expanding Expecto's test capabilities by introducing C\# and Hopac integration, alongside new test suites for focused testing and performance benchmarking. The work added features for writing and running tests in C\# and via Hopac's Job type, while also establishing benchmarks to measure serialiser performance.
2019–2026 — Build automation and template integration
4 changes.
This period focused on improving the developer experience and build infrastructure for the Expecto framework. Key changes included introducing a new build automation script to streamline the release pipeline, adding an official project template for easier project setup, and integrating support for FsCheck3 for property-based testing.
Features
Add C\# test project with async and performance assertion support
A new C\# test project (Expecto.Tests.CSharp) is introduced, providing a C\#-friendly API for writing and running Expecto tests. The project includes a sample test class demonstrating async test cases, pending and focused tests, and the use of the \IsFasterThan\ performance assertion. It also configures NUnit and JUnit XML output. This change enables C\# developers to write and execute Expecto tests using C\# syntax and idioms.
Expecto.Tests.CSharp · high confidence
Add FsCheck integration with configurable test properties
The Expecto.FsCheck module now provides a suite of functions (e.g., \testProperty\, \ptestProperty\, \ftestProperty\, and their \WithConfigs\ and \StdGen\ variants) to integrate FsCheck property-based testing into Expecto. This allows users to define and run FsCheck properties as Expecto tests, with support for focusing, ignoring, and using specific random seeds for reproducible results.
Expecto.FsCheck · high confidence
Add FsCheck3 integration tests for property-based testing
A new test project, Expecto.Tests.FsCheck3, has been added to support property-based testing using FsCheck 3. This includes test cases verifying commutative addition, handling of ignored tests, and focused test execution. The implementation ensures that test results are correctly evaluated, including specific checks for failed tests (such as a deliberately failing distributive property) and ignored tests. The project also includes a migration test for int32/uint64 roundtripping. This addition allows users to write and run FsCheck3-based property tests within the Expecto framework.
Expecto.FsCheck3, Expecto.Tests.FsCheck3 · high confidence
Added Expecto.BenchmarkDotNet integration
Added a new \Expecto.BenchmarkDotNet\ module that integrates BenchmarkDotNet with Expecto. This includes a \BenchmarkConfig\ record and a \benchmark\ function that allows users to run performance tests on annotated types using BenchmarkDotNet's runner.
Expecto.BenchmarkDotNet · high confidence
Added sample tests demonstrating Expecto assertions and colorized diff output
Added new sample test files (Expecto.Flip.Sample.fs and Expecto.Sample.fs) that showcase various Expecto assertion methods including boolean checks, collection containment, floating-point closeness, and property-based testing with FsCheck. The samples also demonstrate the use of a colorized diff printer for improved failure output readability.
Expecto.Sample · high confidence
Expecto template added to the repository
The Expecto.Template directory has been added to the main repository, containing the F\# template files (including Main.fs and Sample.fs) and configuration. This change reorganizes the template into a subfolder structure to support multiple templates and facilitates dotnet pack support, effectively making the Expecto template available for local installation and NuGet distribution.
Expecto.Template · high confidence
Introduce C\#-friendly API and async test support
The library now provides a dedicated C\#-compatible API in the \Expecto.CSharp\ namespace, featuring extension methods on \ExpectoConfig\ for fluent configuration and a \Runner\ module with \TestCase\ and \PendingTestCase\ overloads that accept \System.Threading.Tasks.Task\ and \System.Action\ delegates, enabling easier integration with C\# test runners. Additionally, \Async.fs\ adds \foldSequentiallyWithCancel\ and \foldParallelWithCancel\ to support cancellation tokens in parallel test execution, while \Expecto.fs\ introduces \testCaseTask\ and related builders to allow C\# users to define tests using \Task\-returning methods.
Expecto · high confidence
Introduce Expecto.Hopac integration for async job-based tests
Added a new Expecto.Hopac module that enables running Expecto tests using Hopac's Job type. This includes test case builders (testJob, ftestJob, ptestJob) that convert Hopac jobs to async tasks for Expecto, along with a TestJobBuilder that mirrors Hopac's JobBuilder interface to support job-based test definitions.
Expecto.Hopac · high confidence
Introduce new build automation script for Expecto
A new build script (Build/Program.fs) has been added to automate the Expecto build, test, and release pipeline. The script defines targets for cleaning, building, running tests, packing NuGet packages, and publishing releases to GitHub and NuGet, utilizing the Fake build system.
Build · high confidence
Removals
Removed obsolete Fuchu module
The Fuchu module has been removed from the codebase. This module previously provided core test definitions such as TestCode, Test, and TestResult, along with assertion helpers like assertEqual and the test execution logic. Its removal indicates a shift away from this specific test framework implementation.
Fuchu · high confidence
Architecture
Project infrastructure and repository configuration
The repository received a comprehensive set of infrastructure updates, including the addition of an .editorconfig for consistent code formatting, a .gitattributes file to manage line endings and binary files, and a .gitignore to exclude build artifacts and IDE files. Build and CI configurations were also added or updated, including .travis.yml, appveyor.yml, and a FAKE build script (fake/fake.cmd). Additionally, the repository now includes a CONTRIBUTING.md guide for developers, a Whitesource security configuration, and updated release notes and README documentation.
(repo-wide) · high confidence
Behavioural changes
Improved diff output with colorized text for Expecto.Diff
The Expecto.Diff module now provides a colorized diff output for test assertions. When comparing values, the expected and actual results are displayed with specific colors: green for inserted text, red for deleted text, blue for modified text, and yellow for imaginary text. This enhancement makes it easier to visually distinguish changes in test failure messages.
Expecto.Diff · medium confidence
Removed obsolete FSharpx.Core XML documentation file
The FSharpx.Core.XML file, which contained XML documentation for the FSharpx.Core library, has been removed from the repository. This cleanup likely reflects a change in how documentation is generated or maintained, as the XML file is no longer present in the lib directory.
lib · medium confidence
Test coverage
Added Hopac-specific test suite; Added benchmark tests for serialiser performance; Added comprehensive test suite for the Expecto testing framework; Added focused test suite for Expecto; Removed obsolete Fuchu.Tests/Program.fs test file.
Dependencies
Migrate build and test projects to .NET 10.0 and modernize project structure
The repository has been updated to target .NET 10.0 for the build system and test projects, including the new \Build/Build.fsproj\ and \Expecto.Template\ template. The legacy \Fuchu\ and \Fuchu.Tests\ projects have been removed. The \paket.dependencies\ file has been updated to specify \net10.0\ as a target framework, and the \paket.lock\ has been regenerated to reflect the new dependency graph, including updates to \FsCheck\ (2.16.6) and \BenchmarkDotNet\ (0.14).
(dependencies) · 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 51 → 57 (+6.3)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 77 → 90 (+13.3)
- Architecture 53 → 53 (-0.9)
- Maturity 52 → 56 (+3.9)
- Readiness 55 → 55 (+0.0)
- Security 46 → 75 (+28.6)
Resolved (22)
- Duplicated block (14 lines × 2) (Expecto.Sample/Expecto.Sample.fs)
- High CVE: System.Security.Cryptography.Xml 10.0.7
- High CVE: System.Security.Cryptography.Xml 10.0.7
- High CVE: System.Security.Cryptography.Xml 10.0.7
- High CVE: System.Security.Cryptography.Xml 10.0.7
- High CVE: System.Security.Cryptography.Xml 10.0.7
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- NoWarnInCsproj (.paket/Paket.Restore.targets)
- NoWarnInCsproj (.paket/Paket.Restore.targets)
- NoWarnInCsproj (.paket/Paket.Restore.targets)
- NoWarnInCsproj (.paket/Paket.Restore.targets)
- Off-boarding risk: anonymized user #1
- Secret: aws-access-token (docs/expecto-patronus.psd)
- Secret: aws-access-token (docs/expecto-patronus.psd)
- …and 2 more
New (49)
- Documentation: no usage examples (README.md)
- Duplicated block (10 lines × 2) (Expecto/Logging.fs)
- Duplicated block (14 lines × 2) (Expecto/Logging.fs)
- Duplicated block (21–22 lines × 2) (Expecto.FsCheck/FsCheck.fs)
- Duplicated block (23 lines × 2) (Expecto.FsCheck/FsCheck.fs)
- Duplicated block (29–30 lines × 2) (Expecto.Sample/Expecto.Sample.fs)
- Duplicated block (31 lines × 2) (Expecto.FsCheck/FsCheck.fs)
- Duplicated block (5 lines × 2) (Expecto/Expect.fs)
- Duplicated block (5 lines × 2) (Expecto/TestResults.fs)
- Duplicated block (5–6 lines × 2) (Expecto/CSharp.fs)
- Duplicated block (87 lines × 2) (Expecto.FsCheck/FsCheck.fs)
- Duplicated block (9 lines × 2) (Expecto/Expecto.Impl.fs)
- Expect.equalWithDiffPrinter (cognitive 26) (Expecto/Expect.fs)
- ExpectoFsCheckModule.propertyTest (cyclomatic 16) (Expecto.FsCheck/FsCheck.fs)
- ExpectoFsCheckModule.propertyTest (cyclomatic 16) (Expecto.FsCheck3/FsCheck3.fs)
- FileTooLong: Expecto/Expect.fs (Expecto/Expect.fs)
- FileTooLong: Expecto/Expecto.Impl.fs (Expecto/Expecto.Impl.fs)
- FileTooLong: Expecto/Logging.fs (Expecto/Logging.fs)
- High CVE: System.Security.Cryptography.Xml 10.0.7
- High secret: WD-SECRET-0003 (Fuchu.snk)
- …and 29 more
Architecture
- Containers 0 added · 0 removed · contexts 2 added · 0 removed · edges 0 added · 0 removed
Added bounded contexts (2)
- Expecto
- Expecto.BenchmarkDotNet
Written by watchdog.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 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 cec2c63c8d77c6c21bf7e35d903020f74ddc1cea — 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.