
Fsharp Testing
This covers the full F# testing stack: xUnit for structure, FsUnit for F# friendly assertions, Unquote for quotation based failure messages that actually tell you what broke, and FsCheck for property based testing. You get working examples of async tests with task, parameterized theories, custom generators, and both function stub patterns (the F# way) and NSubstitute for .NET interfaces. The integration testing section shows WebApplicationFactory setup with in-memory databases. Use this when you're setting up a new F# project's test suite or when your existing tests feel clunky because you're fighting against C# patterns. The anti-patterns section alone is worth reading if you've been writing Thread.Sleep in your async tests.
- skills.sh installs
- 1.6K
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --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/everything-claude-code
- Categories
- Testing & QA, .NET & C#
- First seen
- Jun 3, 2026
More from affaan-m/everything-claude-code
All 256- Gget1.6K
- Homelab Pihole Dns1.6K
- Homelab Vlan Segmentation1.6K
- Homelab Wireguard Vpn1.6K
- Mle Workflow1.6K
- Motion Foundations1.6K
- Motion Patterns1.6K
- Quarkus Patterns1.6K
- Quarkus Security1.6K
- Quarkus Tdd1.6K
- Quarkus Verification1.6K
- Skill Scout1.6K
- Uspto Database1.6K
- Prisma Patterns1.4K
- Blender Motion State Inspection1.3K
- Recsys Pipeline Architect1.3K
- Uncloud1.2K
- React Testing910
- React Performance903
- React Patterns893
- Frontend A11y870
- Marketing Campaign827
- Benchmark Optimization Loop826
- Latency Critical Systems818