What Is Graph Node Coverage Criteria — Tentamen Software Testing Blog

Karlo Smid
2 min readFeb 15, 2021
Image by OpenClipart-Vectors from Pixabay


In the previous post, we discussed Graph Coverage Criteria. Today we move onto Graph Node Coverage Criteria. We will introduce you to software testing based on the remarkable book, Introduction To Software Testing by Paul Ammann and Jeff Offutt.

Structural Coverage

Structural Graph coverage is defined by visiting every node and every edge of a graph G.

Node Graph Coverage

Definition of node graph coverage is straightforward:

Test Requirements (paths) TR contains each reachable node from graph G.

For graph:

Credit: Introduction To Software Testing Book

T R ={ visit n0, visit n1, visit n2, visit n3}

Mapping Graph to source code, node coverage is the same as statement coverage.

Edge Graph Coverage

Test Requirements (paths) TR contains each reachable path of length up to 1, inclusive, in Graph G.

The addition of length up to 1 is here because Edge Coverage also should include Node Coverage.

Mapping Graph to source code, edge coverage is branch coverage.

Round Trip Coverage

Test Requirements TR has a path that has the same start and end node.

Complete Path Coverage

This is the manager’s favorite coverage. Test Requirements TR contains all paths in Graph G. But if we have a cyclic path, complete path coverage is not feasible.


If you do not know how to start your testing, try to create a directed graph model for a feature that you are testing.

Originally published at https://blog.tentamen.eu on February 15, 2021.