What Is Graph Node Coverage Criteria — Tentamen Software Testing Blog

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.




Founder of Tentamen, software testing agency.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Install Velero with HELM in GCP

Monitoring Postgres Logical Replication

Google cloud & AWS

Jitsi Installation with JWT Support on Ubuntu 20.04 TLS

Java 8 Update 311 MSI Installers Released

Download MSI Installers

Participant story: Abby

We Can’t Say No, Twelfth Project Schedule Game — Tentamen Software Testing Blog


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Karlo Smid

Karlo Smid

Founder of Tentamen, software testing agency.

More from Medium

Continuous Testing: The Future of QA (part 1)

5 Benefits of Enterprise Continuous Testing — ToolSwift

What’s the origin of the term ‘bug’? | Agilitest blog