News for hackers. Stuff that matters.
Re:Coverage is not strongly correlated with test suite effec... by KZeillmann on Monday September 27, 2021 @08:30PM (#28677898)
A team getting to 100% test coverage and enforcing it feels like an application of Goodhart's Law.

When a measure becomes a target, it ceases to be a good measure.

At my last job, we required 100% code coverage for most code, and the other parts of the code (in ideality) were marked with ignores that were well-thought-through.

In practice, I ended up writing a bunch of test cases only to hit the if blocks. It didn't mean that the tests I wrote were any good. I'm still a fan of 100% test coverage, but with some leeway for what needs to be ignored, and what needs to be tested later (non-critical paths, if you have a deadline, perhaps)

Re:Coverage is not strongly correlated with test suite effec... by dnautics on Monday September 27, 2021 @08:36PM (#28677937)
It gets crazy with demands for 100% test coverage, in languages where you're encouraged to write compile-time logic, macros, setup-dependent minor details, time bombs, asserts which throw compiler errors when you misconfigure, etc.
Re:Coverage is not strongly correlated with test suite effec... by SilverRed on Tuesday September 28, 2021 @12:06AM (#28679221)
I have never used the % stat as anything more than curiosity but I have certainly looked at the highlighted reports generated to see large blocks of untested code which is genuinely useful info to see.