Technique · Testing
Property-based tests
Generates inputs and checks invariants that must hold for all of them, then shrinks failures to a minimal case.
Sub-techniques
-
Round-trip properties
V1021.001decode(encode(x)) == x for serializers and parsers.
-
Model-based properties
V1021.002Compare the implementation against a simple reference model.
-
Stateful testing
V1021.003Generate sequences of operations and check invariants after each.