What Is Graph Node Coverage Criteria — Tentamen Software Testing Blog

Image by OpenClipart-Vectors from Pixabay

TL;DR

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.

Conclusion

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

Video Streaming with Nginx and Laravel

SANS Holiday Hack 2020

Configuring ssh key on Mac(user-side, no server-side)

Terraform Certification Quick Study Guide

The Case of the Missing Customers in Scrum

Setting Up Server Environments For A Seamless Git Deployment

CS 373 Blog #13 Fall 2021

Project KindMeal.my Clone

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

Software Testing 101

SOLID Software Design Principles-Write better code(OOP)

What is the best way to contribute as a QA in 2022?

Be aware of the “fake it until you make it” mindset in Test Automation and CI/CD