Re:What I wish I knew when I became CTO
by yread on Wednesday February 14, 2018 @03:41AM
(#16374420)
I always find code coverage such a useless metric: if you have two independent ifs next to each other and one test goes in one if and another test in the other you have 100% coverage. Congratulations. But you've never tested what happens when you go in both
[ Parent
| on HN ]
Re:What I wish I knew when I became CTO
by apocalyptic0n3 on Wednesday February 14, 2018 @09:55AM
(#16376113)
I agree that it is a useless statistic, especially when comparing unit vs integration vs functional vs smoke testing. There are different types of tests and just because you are reaching 90% of your code does not mean you are thoroughly testing it.
The only reason I brought it up was to show that we don't skip test writing entirely and the projects where we do write them, it isn't like we just wrote a test to check that "Project Name" is returned on the homepage and called it a day.
Re:What I wish I knew when I became CTO
by deckard1 on Wednesday February 14, 2018 @10:59AM
(#16376701)
A few years back a person I worked with was tasked with implementing code coverage. Part of that task was they also had to get our code base up to 80% coverage or so.
They wrote stupid test after stupid test after stupid test. Hundreds of them. Oh Em Gee. It was like that story of Mr T. Where the army sergeant punished him by telling him to go chop trees down, only to come back and find Mr T had cut down the whole forest.
Re:What I wish I knew when I became CTO
by icebraining on Wednesday February 14, 2018 @04:40AM
(#16374667)
That's just the basic coverage metrics, there's more than that: https://en.wikipedia.org/wiki/Code_coverage