
Fsharp Testing
This covers the full F# testing stack: xUnit for structure, FsUnit for idiomatic assertions, Unquote for quotation-based test failures that show you exactly what broke, and FsCheck for property-based testing. The examples are solid, from basic unit tests through async patterns, custom generators, and ASP.NET Core integration tests with WebApplicationFactory. The function stub approach for mocking is refreshingly practical compared to heavyweight mocking frameworks. Activate this when you're writing F# tests or setting up a test suite, especially if you want to move beyond basic assertions into property-based testing. The anti-patterns section alone is worth reading.
- skills.sh installs
- 5.3K
- GitHub stars
- 300.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add affaan-m/ecc --skill fsharp-testing --agent claude-codeInstalls into .claude/skills of the current project.
Files
F# Testing Patterns
Comprehensive testing patterns for F# applications using xUnit, FsUnit, Unquote, FsCheck, and modern .NET testing practices.
When to Activate
- Writing new tests for F# code
- Reviewing test quality and coverage
- Setting up test infrastructure for F# projects
- Debugging flaky or slow tests
Test Framework Stack
| Tool | Purpose |
|---|---|
| xUnit | Test framework (standard .NET ecosystem choice) |
| FsUnit.xUnit | F#-friendly assertion syntax for xUnit |
| Unquote | Assertion library using F# quotations for clear failure messages |
| FsCheck.xUnit | Property-based testing integrated with xUnit |
| NSubstitute | Mocking .NET dependencies |
| Testcontainers | Real infrastructure in integration tests |
| WebApplicationFactory | ASP.NET Core integration tests |
Unit Tests with xUnit + FsUnit
Basic Test Structure
module OrderServiceTests
open Xunit
open FsUnit.Xunit
[<Fact>]
let ``create sets status to Pending`` () =
let order = Order.create "cust-1" [ validItem ]
order.Status |> should equal Pending
Sponsors
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Testing & QA, .NET & C#
- First seen
- Jul 14, 2026
More from affaan-m/ecc
All 263- Tinystruct Patterns5.3K
- Uncloud5.3K
- Parallel Execution Optimizer5.3K
- Prediction Market Oracle Research5.3K
- Prediction Market Risk Review5.3K
- Data Throughput Accelerator5.3K
- Recursive Decision Ledger5.3K
- Team Agent Orchestration5.1K
- Dynamic Workflow Mode5K
- Kubernetes Patterns4.9K
- Intent Driven Development4.8K
- Inherit Legacy Style4.8K
- Orch Build Mvp4.8K
- Codehealth Mcp4.8K
- Orch Pipeline4.8K
- Orch Add Feature4.8K
- Orch Refine Code4.8K
- Orch Fix Defect4.8K
- Orch Change Feature4.8K
- Literature Review3.9K
- Everything Claude Code3.6K
- Scholar Evaluation3.4K
- Pubmed Database3.3K
- Gget3.2K