Skip to content
affaan-m avatar

Fsharp Testing

F# testing patterns covering xUnit, FsUnit, Unquote, and FsCheck property-based tests for .NET projects.

CCM score
67 of 100
skills.sh installs
8.5K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers unit, async, parameterized, property-based, mocking, and ASP.NET Core integration testing patterns for F# code
  • Includes examples for Theory parameterization, FsCheck custom generators, and function-stub versus NSubstitute mocking
  • Enforces fresh state per test, behavior-level assertions, and passing CancellationToken through async tests
  • Designed for F# teams on the standard .NET test stack who want a reference for organizing unit, integration, and property tests

Install

$ npx -y skills add affaan-m/ecc --skill fsharp-testing -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

ToolPurpose
xUnitTest framework (standard .NET ecosystem choice)
FsUnit.xUnitF#-friendly assertion syntax for xUnit
UnquoteAssertion library using F# quotations for clear failure messages
FsCheck.xUnitProperty-based testing integrated with xUnit
NSubstituteMocking .NET dependencies
TestcontainersReal infrastructure in integration tests
WebApplicationFactoryASP.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

Details

Repository
github.com/affaan-m/ecc
Categories
Testing & QA, .NET & C#
First seen
Jul 14, 2026

Questions

What does the fsharp-testing skill do?

The fsharp-testing skill gives the agent patterns for testing F# code with xUnit, FsUnit, Unquote, FsCheck property-based testing, integration tests, and test organization. It covers unit tests, async tests, theories, property tests, mocking, and ASP.NET Core integration tests.

How do I install the fsharp-testing skill?

Run this command in a project: npx -y skills add affaan-m/ecc --skill fsharp-testing -y. Once installed, the agent can write and review F# tests using the xUnit and FsCheck patterns in the skill.

Which category does fsharp-testing belong to, and what sets it apart?

It sits in the Testing & QA category and ranks in the top 100 there, alongside skills such as tdd and webapp-testing. Its focus is F# specifically, with FsUnit assertions, Unquote failure messages, and FsCheck property tests for F# functions.

Do I need special tools to use fsharp-testing?

The skill assumes a .NET project run with dotnet test, plus the xUnit, FsUnit, Unquote and FsCheck packages. Integration examples also use NSubstitute, Testcontainers, and WebApplicationFactory for ASP.NET Core.

More from affaan-m/ecc

All 257

Similar to Fsharp Testing

More Testing & QA