fsharp-testing
F# testing patterns with xUnit, FsUnit, Unquote, FsCheck property-based testing, integration tests, and test organization best practices.
npx skills add mturac/everything-openai-codex --skill fsharp-testing --agent codex
Same command for any agent — swap --agent for claude-code, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 ```fsharp 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 [<Fact>] let ``confirm changes status to Confirmed`` () = let order = Order.create "cust-1" [ validItem ] let conf
- When to Activate
- Test Framework Stack
- Unit Tests with xUnit + FsUnit
- Basic Test Structure
- Assertions with Unquote
- Async Tests
- Parameterized Tests with Theory
- Property-Based Testing with FsCheck
- Using FsCheck.xUnit
- Custom Generators
- Mocking Dependencies
- Function Stubs (Preferred)
- NSubstitute for .NET Interfaces
- ASP.NET Core Integration Tests
Run all tests dotnet test Run with coverage dotnet test --collect:"XPlat Code Coverage" Run specific project dotnet test tests/MyApp.Tests/ Filter by test name dotnet test --filter "FullyQualifiedName~OrderService" Watch mode during development dotnet watch test --project tests/MyApp.Tests/
What does the fsharp-testing skill do?
F# testing patterns with xUnit, FsUnit, Unquote, FsCheck property-based testing, integration tests, and test organization best practices.
How do I install it?
Run `npx skills add mturac/everything-openai-codex --skill fsharp-testing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
