3 ms·
> The branch coverage thing is a weird, artificial-seeming requirement Yes that's because it's a requirement designed by a standards body. I found a paper "Is
by infogulch 5y ago
> The branch coverage thing is a weird, artificial-seeming requirement
Yes that's because it's a requirement designed by a standards body. I found a paper "Is 100% Test Coverage a Reasonable Requirement? Lessons Learned from a Space Software Project" (2017) that mentions that 100% branch coverage is a requirement in European Cooperation for Space Standardization (ECSS) for Class A software (where failure could result in loss of life, etc). The paper concluded:
> Our findings include that there seems to be a break-even point between 80% and 95%, and everything beyond this points is increasingly costly and could introduce new project risks—which confirms findings reported so far in literature (Section 5). However, the interview revealed that, still, 100% coverage can be a reasonable quality requirement; even though a 100% requirement is not a good indicator for the software quality as such.
https://www.researchgate.net/publication/319141355_Is_100_Test_Coverage_a_Reasonable_Requirement_Lessons_Learned_from_a_Space_Software_Project https://www.researchgate.net/publication/319141355_Is_100_Te...
It doesn't follow that because rust is a safe language that it cannot expose test harnesses that would enable 100% branch coverage. Personally I'm ambivalent on this, maybe it's not useful, but it doesn't seem bad either. But your reaction to this requirement seems weird, like the "fox and the grapes" fable... You can't get 100%-branch coverage, so you give up and claim that 100% branch coverage is dumb, why would anyone want that anyway? Do you really think that 100% branch coverage testing should be unavailable to rust programmers if that's what they need (for whatever reason, including meeting some admittedly arbitrary standard)?
- tptacek 5y agoA couple of people have brought this up here, and it's an argument that makes sense. I'll just note that the sqlite page, which is what I'm critiquing, isn't written this way; the project doesn't say "we use C because ECSS requires us to build software in an 100%-branch-coverage language", but rather speaks to the important benefit of literal 100% branch coverage. It's that important benefit I question, not the logistics problems they face, which I concede.
- infogulch 5y agoThat might just be me twice, I added a new reference this time at least ^_^ I agree that 100% branch coverage as a goal in and of itself is generally dubious. I seem to recall an interview where the SQLite creator, Richard Hipp, described the reasons behind the branch coverage testing in a bit more detail and mentioned that it was a requirement from one of their customers, which is where I got that idea. Sorry I don't have a specific reference.