TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Software Testing

Code Coverage Metrics

Overview

In this tutorial, we will learn different types of Code Coverage Metrics. Code Coverage Testing is a Whitebox Testing technique that measures the extent of code exercised or executed during the test. We need to execute the code to get the code coverage analysis. So, it is a dynamic testing technique.

Types of Code Coverage Metrics

There are different types of coverage metrics. Some of them are listed below:

  • Line Coverage
  • Branch Coverage
  • Condition Coverage
  • Loop Coverage
  • Path Coverage
  • Function Coverage

Line Coverage

This metric is also called as Statement Coverage. This metric indicates the percentage of the program code statements exercised by the tests. Line coverage checks whether all the statements are exercised during the test.

https://www.testingdocs.com/statement-coverage/

Branch Coverage

This metric is also called as Decision Coverage. This metric indicates the percentage of the branches in the software program covered by the tests. Branch coverage checks whether all the branches are covered during the test.

For example, if there are two branches in the program and only one is executed by the test. Then the branch coverage is 50%.

https://www.testingdocs.com/branch-coverage/

Condition Coverage

This metric is also called as Predicate Coverage. Percentage of the conditions that were executed by the tests.

Loop Coverage

This metric indicates the percentage of loops in the software program that were executed by the tests.

Path Coverage

A path is an execution flow in the software program from start to end. This metric indicates the percentage of paths covered by the tests.

Function Coverage

This metric is also called as Method Coverage. This metric indicates the percentage of the functions executed by the tests.

https://www.testingdocs.com/method-or-function-coverage/

—

Software Testing Tutorials:

https://www.testingdocs.com/software-testing-tutorials/

Related Posts

PuTTY Tool UI

Software Testing /

Useful Tools for Software Testers

Errors Code Testing Development

Software Testing /

Error Density Metrics

Errors Code Testing Development

Software Testing /

Error Removal Effectiveness Metrics

RACI Chart

Software Testing /

RACI Chart

Android Calculator Icon

Software Testing /

Android Calculator Test Cases

‹ Software Testing Levels› Risk Analysis Fundamentals

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version