Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

software testing

What are coverage items?

Muhammad Ashir

In white-box testing, the code and modules that are to be tested are called coverage items.

White-box testing

White-box testing is used to test the internal structure, design, and code quality of the product. It is used to test and verify the input and output data flow of the system, as opposed to its functionality.

Although white-box testing helps to uncover errors in the system, it does not test for unimplemented code. This means that white-box testing can potentially miss any requirements that have not been implemented.

White-box testing checks for the following code coverage criteria:

  1. Function coverage

  2. Call coverage

  3. Class coverage

  4. Linear code sequence and jump (LCSAJ) coverage

  5. Data flow coverage

  6. Loop coverage

  7. Relational operator coverage

The code coverage is defined as the degree to which the source code is executed when a particular group of tests are run.

Functional coverage

Functional coverage checks how much of the design and functionality have been covered by the source code during the execution of test cases.

Call coverage

Call coverage is the measure of how many functions or procedures are called at least once during the test run.

Class coverage

Class coverage is the measure of how many classes are covered by the test cases.

Linear code sequence and jump (LCSAJ) coverage

LCSAJ analyzes structural units in code and gives a measure of “how much testing is enough.”

Data flow coverage

Data flow coverage is based on the principle that for each statement in the code, we should identify all of the possible ways of defining the variables used in it. It is the criteria of how variables are defined and used in the code.

Loop coverage

Loop coverage is a measure of how well the loops in the program are covered by the testing suite.

Relational operator coverage

Relational operator coverage is used to test for off-by-one errors in relational expressions involving relational operators.


software testing


Muhammad Ashir
Copyright ©2022 Educative, Inc. All rights reserved

View all Courses

Keep Exploring