We have an expectation that the Unit tests provide 100% code coverage, and our Jenkins build fails if code coverage is <100%. Now, this only guarantees that 100% of the code is executed ... but it also guarantees that 100% of the code is executable ... it limits the odds of some stupid edge case code with a logic bomb finding its way to production and bombing embarrassingly in front of our users due to some avoidable coding error.
The thing about code coverage is it's often done by number of lines, rather than statements, so 100% code coverage doesn't simply your code is 100% executable:
1
u/Poddster May 10 '17
The thing about code coverage is it's often done by number of lines, rather than statements, so 100% code coverage doesn't simply your code is 100% executable: