property-based-testing

Solid

Use when writing tests for serialization, validation, normalization, or pure functions - provides property catalog, pattern detection, and library reference for property-based testing

Testing & QA 165 stars 21 forks Updated 1 weeks ago

Install

View on GitHub

Quality Score: 81/100

Stars 20%
74
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
0
Description 5%
100

Skill Content

# Property-Based Testing ## Overview Property-based testing (PBT) generates random inputs and verifies that properties hold for all of them. Instead of testing specific examples, you test invariants. **When PBT beats example-based tests:** - Serialization pairs (encode/decode) - Pure functions with clear contracts - Validators and normalizers - Data structure operations ## Property Catalog | Property | Formula | When to Use | |----------|---------|-------------| | **Roundtrip** | `decode(encode(x)) == x` | Serialization, conversion pairs | | **Idempotence** | `f(f(x)) == f(x)` | Normalization, formatting, sorting | | **Invariant** | Property holds before/after | Any transformation | | **Commutativity** | `f(a, b) == f(b, a)` | Binary/set operations | | **Associativity** | `f(f(a,b), c) == f(a, f(b,c))` | Combining operations | | **Identity** | `f(x, identity) == x` | Operations with neutral element | | **Inverse** | `f(g(x)) == x` | encrypt/decrypt, compress/decompress | | **Oracle** | `new_impl(x) == reference(x)` | Optimization, refactoring | | **Easy to Verify** | `is_sorted(sort(x))` | Complex algorithms | | **No Exception** | No crash on valid input | Baseline (weakest) | **Strength hierarchy** (weakest to strongest): ``` No Exception -> Type Preservation -> Invariant -> Idempotence -> Roundtrip ``` Always aim for the strongest property that applies. ## Pattern Detection **Use PBT when you see:** | Pattern | Property | Priority | |---------|----------|---------...

Details

Author
ed3dai
Repository
ed3dai/ed3d-plugins
Created
2 months ago
Last Updated
1 weeks ago
Language
Python
License
None

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Solid

playwright-skill

Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, fixtures, POM, network mocking, auth flows, debugging, CI/CD (GitHub Actions, GitLab, CircleCI, Azure, Jenkins), framework recipes (React, Next.js, Vue, Angular), and migration guides from Cypress/Selenium. TypeScript and JavaScript.

185 Updated 1 weeks ago
testdino-hq
Testing & QA Solid

playwright-core

Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, assertions, fixtures, network mocking, auth flows, debugging, and framework recipes for React, Next.js, Vue, and Angular. TypeScript and JavaScript.

185 Updated 1 weeks ago
testdino-hq
Testing & QA Featured

dotnet-test-frameworks

Reference data for .NET test framework detection patterns, assertion APIs, skip annotations, setup/teardown methods, and common test smell indicators across MSTest, xUnit, NUnit, and TUnit. DO NOT USE directly — loaded by test analysis skills (test-anti-patterns, exp-test-smell-detection, exp-assertion-quality, exp-test-maintainability, exp-test-tagging) when they need framework-specific lookup tables.

997 Updated 4 days ago
dotnet
Testing & QA Featured

exp-dotnet-test-frameworks

Reference data for .NET test framework detection patterns, assertion APIs, skip annotations, setup/teardown methods, and common test smell indicators across MSTest, xUnit, NUnit, and TUnit. DO NOT USE directly — loaded by test analysis skills (exp-test-smell-detection, exp-assertion-quality, exp-test-maintainability, exp-test-tagging) when they need framework-specific lookup tables.

997 Updated 4 days ago
dotnet
Testing & QA Listed

unit-testing

Unit testing patterns: Vitest config with v8 coverage, Testing Library behavior testing, MSW for HTTP mocking (vs jest.mock), it.each parametrized tests, spies vs mocks vs stubs, testing async code, snapshot testing guidelines. Use when writing unit and component tests.

11 Updated 1 months ago
rnavarych