nw-pbt-dotnet

Generate property-based tests for .NET using FsCheck, CsCheck, and fsharp-hedgehog.

Updated Mar 18, 2024
One-click install
npx skills add https://github.com/v1bh0r/precise-ledger-pro --skill nw-pbt-dotnet-v1bh0r
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nw-pbt-dotnet
Source: https://github.com/v1bh0r/precise-ledger-pro/tree/main/nWave/skills/nw-pbt-dotnet
Command: npx skills add https://github.com/v1bh0r/precise-ledger-pro --skill nw-pbt-dotnet-v1bh0r

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Property-based testing reduces flaky tests and manual test drafting by automatically generating diverse inputs to verify correctness in .NET applications using FsCheck, CsCheck, and fsharp-hedgehog.

Core Features & Use Cases

  • Cross-framework support enabling property-based tests in C#, F#, and other .NET languages with shared properties.
  • Stateful and parallel testing options via CsCheck, plus integrated shrinking from FsCheck and Hedgehog.
  • Real-world use: validate data structures, algorithms, and stateful systems against a wide range of inputs to uncover edge cases.

Quick Start

Install FsCheck, CsCheck, or fsharp-hedgehog in your .NET project and write your first property-based test to verify a simple invariant.

Frequently Asked Questions about nw-pbt-dotnet

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is property-based testing in .NET and how does it reduce flaky tests?

Property-based testing in .NET automatically generates diverse inputs to verify correctness, reducing flaky tests and manual test drafting by validating data structures and algorithms against a wide range of edge cases.

How do I write property-based tests for both C# and F# projects?

You can write property-based tests for C# and F# projects using cross-framework support from FsCheck, CsCheck, and fsharp-hedgehog, enabling shared properties across mixed-language .NET applications.

Does CsCheck support stateful and parallel testing scenarios?

Yes, CsCheck supports stateful and parallel testing options for .NET applications, allowing you to validate complex stateful systems and concurrent scenarios against automatically generated inputs.

Can I use FsCheck and fsharp-hedgehog for deterministic test generation?

Yes, FsCheck and fsharp-hedgehog support deterministic generation for .NET tests, providing integrated shrinking to automatically minimize failing test cases to their root causes.

What is the best way to integrate property-based testing with common .NET test runners?

The best way to integrate property-based testing is by installing FsCheck, CsCheck, or fsharp-hedgehog in your .NET project, which seamlessly integrate with common .NET test runners to execute generated test cases.

When should I not use property-based testing for my .NET application?

You should avoid property-based testing when verifying simple, fixed-input scenarios where manual test drafting is sufficient, as the overhead of configuring generators and shrinking adds unnecessary complexity.