This might work when the test really describes&tests the business rule, not when the test simply contains a mirror of the implementation with everything replaced by mocks and just checks that the implementation is what it is, conditioning all people changing the code in the future to always have to change the test as well.
Tests can be messed up just like anything else can be messed up. Doesn’t mean that the concept itself is flawed.
If you only do things that people cannot mess up, then you’ll quickly end up not doing anything at all.
The biggest benefit to me that testing has is when refactoring. If I have decent test coverage and I change something major, tests help me to see if I accidentally broke something on the way, which is especially helpful if I am touching ancient code written by someone who left the company years ago.
Blech, this is my least favorite kind of testing. I’d much rather have some all-encompassing integration tests even if they’re confusing AF, than the “yep the language still works as advertised” nonsense that this approach often amounts to.
This might work when the test really describes&tests the business rule, not when the test simply contains a mirror of the implementation with everything replaced by mocks and just checks that the implementation is what it is, conditioning all people changing the code in the future to always have to change the test as well.
Tests can be messed up just like anything else can be messed up. Doesn’t mean that the concept itself is flawed.
If you only do things that people cannot mess up, then you’ll quickly end up not doing anything at all.
The biggest benefit to me that testing has is when refactoring. If I have decent test coverage and I change something major, tests help me to see if I accidentally broke something on the way, which is especially helpful if I am touching ancient code written by someone who left the company years ago.
Blech, this is my least favorite kind of testing. I’d much rather have some all-encompassing integration tests even if they’re confusing AF, than the “yep the language still works as advertised” nonsense that this approach often amounts to.