0

blog.ploeh.dk · 16d · discuss

Attempting to conjure good properties. Ever since I learned about property-based testing, I've been fascinated by it. The notion of test data generators seem superior to Test Data Builders: Both require some degree of test-specific boilerplate code, but you get more bang for your bob with test data generators. Instead of hard-coding some (often arbitrary) constant value in a Test Data Builder, you define a range of values that, one hopes, belong to the same equivalence class. Getting started with property-based testing isn't much more difficult than writing good unit tests with Test Data Builders. You can start with a...