Re:Avoiding Test-Case Permutation Blowout
by ris on Wednesday September 04, 2024 @05:43PM
(#41451194)
Implementing a very cut-down and basic sketch of the business rules of a particular observable effect can allow you to cover a lot of cases in a very compact and digestible form without falling into the traps that your actual business rules do. This is fairly fundamental to property-based testing.
If you use literal expected results for all of your test cases, you're probably either not covering enough cases or making your tests so verbose and long that they will start to diverge in weird ways.
Does this do what I think it does?
This is terrible practice. Tests should not replicate the business logic of the production code.