Go to content

Domain Invariants & Property-Based Testing for the Masses - Romeu Moura

Domain invariants are all around you. In every business rule your domain expert ever tried to give you. You should use them to guide your design. You should also be testing them! Not only an example representing them: but testing the invariant itself. You can do them with property-based tests (PBTs). If you think you cannot do PBTs on legacy codebases (or outside FP) this talk should show you otherwise. Let’s also use Property-based tests to reduce test-debt. Create smaller, fewer tests that: test more, are more readable & document the problem. Challenge your understanding of the domain and communication with domain experts.

June 12, 2017