nw-pbt-go

Automate property-based testing for Go applications with rapid and gopter.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/StudentCristian/nWave-github --skill nw-pbt-go
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nw-pbt-go
Source: https://github.com/StudentCristian/nWave-github/tree/main/.github/skills/nw-pbt-go
Command: npx skills add https://github.com/StudentCristian/nWave-github --skill nw-pbt-go

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go developers often struggle to exhaustively test complex logic; property-based testing with rapid and gopter provides automated generation, shrinking, and invariant checking to find edge cases early.

Core Features & Use Cases

  • Rapid: idiomatic Go API with automatic shrinking and stateful testing using a simple T-like interface.
  • Gopter: commands-based stateful testing with per-field generators and struct generation capabilities.
  • Use Case: Validate the correctness of algorithms by asserting invariants over randomized inputs and comparing expected properties.

Quick Start

Run go test to execute property-based tests against randomized inputs.

Frequently Asked Questions about nw-pbt-go

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

FAQPage Schema
How do I automate input generation and shrinking for Go property-based testing?

Go property-based testing automates input generation and shrinking by using rapid and gopter to assert invariants over randomized inputs. This approach automatically finds edge cases by comparing expected properties against generated test data.

Does rapid support stateful testing and automatic shrinking in Go?

Rapid supports stateful testing and automatic shrinking in Go through an idiomatic API using a simple T-like interface. It integrates directly with standard go test to execute property-based tests against randomized inputs.

How do I generate per-field struct data for gopter commands-based stateful testing?

Gopter generates per-field struct data for commands-based stateful testing by providing specialized generators for struct fields. This allows you to validate algorithm correctness by asserting invariants over complex, randomized state transitions.

What is the best way to find edge cases in complex Go algorithms?

Property-based testing is the best way to find edge cases in complex Go algorithms because it automatically generates randomized inputs and shrinks failures. Using rapid and gopter, you can exhaustively test logic and catch bugs early.

Can I integrate property-based testing with standard go test?

You can integrate property-based testing with standard go test by running the standard testing command. Both rapid and gopter are designed to work within the native Go testing framework to execute tests against randomized inputs.

When should I use gopter commands-based stateful testing over rapid?

You should use gopter commands-based stateful testing when you need per-field struct generation and command-based state transitions. Rapid is better suited for idiomatic automatic shrinking and simpler stateful testing using a T-like interface.