Comment by blowski
3 years ago
There is a difference between these three statements:
1. It can't be tested.
2. I don't know how to test it.
3. The tests don't give enough value given the effort required to write them.
The less experience you have with tests, the worse the cost-benefit analysis comes out. This is why people disagree over unit tests. Good tests give a huge productivity gain, but the opposite is true of bad tests. Unfortunately, there's a vicious cycle:
You write bad tests
-> You don't value tests
-> You don't spend time learning to improve tests
-> You continue to write bad tests
The problem is that writing good tests is harder than writing original code.
And what happens in most companies? We hired a junior engineer and don't have work for them... let them write tests!