Why tests are fine when wet, not DRY (don't repeat yourself)
twitter.com
twitter.com
Test that are DRY increases the confidence that the test tests the correct things by holding everything else constant.
When the tests break, no one wants to scroll through 500 lines of test code looking at every detail to find out what "variant" the test is and if the problem is in the test because of a fatfinger, or the problem is in the code being tested.
Dry tests use a lot of helper methods and those are a layer of indirection. To understand a dry test, you have to also understand the helper methods, and whatever helpers they all call.
> Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
This is exactly my point, you reduce noise.
> To understand a dry test, you have to also understand the helper methods, and whatever helpers they all call.
To understand your TEST SUITE, you understand all the helpers exactly once with DRY tests.
> use your best judgement