From the course: Tech on the Go: Building a Software Test Department

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Measuring code and test coverage

Measuring code and test coverage

- [Instructor] Measuring code and test coverage. Code coverage is the measure of how much code is executed with a given operation. Code coverage is typically calculated by automated test suites, which we'll discuss later on. Code coverage is reported in percentages, like 76% coverage. A higher percentage means more code was executed. Code coverage is important for a number of reasons. A higher percentage of coverage reduces the risk of bugs. Notice I said reduce, not eliminate. Like security, there is no absolute guarantee of error-free code. Code coverage highlights unused or untested code components, which can be helpful for optimization. It's also an indicator of code quality. Being able to report the code coverage indicates an interest in an effort to improve the software. Finally, code coverage is a requirement in some types of mission-critical industries, such as avionics and automotive safety. Code coverage is a…

Contents