Property-Based Test Generator
AvanzadatestingContexto mínimo: 32K
Generates property-based tests that assert invariants across randomly generated inputs using frameworks like Hypothesis, fast-check, or jqwik. Identifies properties (round-trip, idempotence, invariants, oracle comparison), defines generators and shrinking, and sets up stateful testing for complex APIs. Surfaces edge cases that example-based tests miss.
Casos de uso
- Adding property-based tests for a parser or serializer
- Testing round-trip and idempotence properties
- Defining custom generators and shrinking
- Stateful testing of a data structure or API
- Finding edge cases example tests miss
Prompt de ejemplo
Generate property-based tests for this function: [paste function]. Include: 1. Identified properties (round-trip, invariants, oracle) 2. Input generators and shrinking strategy 3. Tests using [Hypothesis/fast-check/jqwik] 4. A stateful test if applicable 5. Notes on edge cases the properties should reveal
Modelos recomendados
Herramientas compatibles
claude-codecursorkiroany
Modalidades
Entrada: text, code
→Salida: text, code
Skills relacionadas
Autor
OpenModels Community