Automated tests for complex business logic often produce false failures and miss defects because the test data was prepared incorrectly. In this talk I'll present a practical approach to preparing data for automated tests, using discount logic as an example: how to translate business rules into a compact data set using test design techniques, and how to organize data creation through the test framework. We'll take a separate look at the typical causes of flakiness: hitting the wrong range of conditions, hidden dependencies between parameters, "dirty" data left over between runs, and parallel execution. I'll also show an example of how to set up data isolation and cleanup so that runs stay repeatable and failure diagnosis is unambiguous.