Programming Insight: you want your tests to be rock. dumb.
This is not the place to be clever and factor out commonality. This keeps your tests from being harder to understand than the code you're testing, and that lack of commonality prevents you from making the same mistakes everywhere.
This is not the place to be clever and factor out commonality. This keeps your tests from being harder to understand than the code you're testing, and that lack of commonality prevents you from making the same mistakes everywhere.
Yes, 100% agree. If I can't look at the test function and know exactly what is getting tested, you're doing something wrong. If I have to go read helper functions (TestSetup and SuiteSetup count!), then your tests are too complicated... and generally that means you're testing too much and your code is probably not well isolated.Aug 19, 2014
Add a comment...