What Is Test Path In Directed Graph — Tentamen Software Testing Blog

Dubravkin put path

TL;DR

In the previous post, we introduced Directed Graphs that are an important foundation for many test coverage criteria. Today we explain what is Test-Path in the context of the Directed Graph. We will introduce you to software testing based on the remarkable book, Introduction To Software Testing by Paul Ammann and Jeff Offutt.

How Many Paths

In the What Is Directed Graph post, we finished with the statement that Fizz-Buzz Graph has 10 nodes and 12 edges and how many different paths are there. The answer is four, or the number of OUTPUTS in the Fizz-Buzz directed graph.

Test-Path

A Test-Path represents the execution of a Test Case. We have a constraint that a test path always starts at the initial node.

Definition

It is important to explain the relationship between Test Case and Test-Path. In deterministic software, we could have many Test Cases for the same Test-Path. As this is redundant testing that we want to avoid, we always design Test Cases to have a one-to-one relation with Test-Path.

From Book: Introduction To Software Testing

In the previous Fizz-Buzz problem, we have 100 iterations and four test paths. For example, Test Cases TC1 n = 3, TC2 = n = 9 and TC3 n = 27 all map to same Test-Path with OUTPUT Fizz.

Directed Graph Traveling

It is usual to use traveling terminology for Test Paths in Directed Graphs. Test-Path visited node and edge if those two are part of Test-Path.

Originally published at https://blog.tentamen.eu on January 14, 2021.

Founder of Tentamen, software testing agency.