3 ms·
I had an interesting conversation with a co-worker today, about why unit-test coverage is always bad unless enforced. I decided that it's because even though m
by lifeisstillgood 11y ago
I had an interesting conversation with a co-worker today, about why unit-test coverage is always bad unless enforced.
I decided that it's because even though my boss and myself will have good intentions, we can both mutually decide (without ever discussing it) that the tests should slide - I will try to meet his deadline, he won't check too hard.
Unless there are credible institutions that take that decision away from us (a build bot that refuses to deploy untested code for example) we will slip towards worse.
Management does not need to apply pressure towards misbehaviour - they simply have to not constantly strive for best behaviour. Our expectations fill in the rest.
As such, we are unlikely ever to find an email from the board saying "Hans, frig the tests next week, we can't be arsed to invest in catalytic converters", but the organisation decided that anyway.
I think it's to do with lack of candour - see the Pixar book out recently
- crpatino 11y agoThis is not on the same league. Your unit-test coverage example is closer to the Toyota incident. Surely, it was a catastrophe, and lives were indeed lost, but no one actively inserted a "speed up when driver hits the breaks" feature into the firmware. A closer analogy to the VW case is if the build bot actually did exist, but you wrote some nefarious unit test that just spit out all OK results regardless of what the exercised code did, so that you were allowed to merge whatever crap your team produce, as long as it actually compile. If that is the case, we can discuss different possible assignations of responsibility, but you cannot claim that some good intentioned people just slide into misbehavior due to not paying enough attention. Someone had to be aware they were actively cheating!
- lifeisstillgood 11y agoBut my unit tests do do that ;-)