DEV Community

Discussion on: Clean Code with Unit Tests: Tips and tricks for keeping your test suites clean

Collapse
 
jovanc profile image
Jovan Cvetanović

In summary on 2.
"Use test object builders to make test setup easy for commonly used objects"

Use random data set will help dealing with edge cases. Hardcoded (expected) results are making test cases less reliable. From my experience, it always made me loose time with hardcoded values.