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
Test path: A path p, possibly of length zero, that starts at some node in N0 and ends at some node in Nf.
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.
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.
Question: What are Test Cases for full test coverage in the Fizz-Buzz example?
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.
Comments are closed.