Test Paths, Example,SESE graphs, Visit, Tour, Syntactic reach, Semantic reach in software testing
Test Paths, Example, SESE graphs, Visit, Tour, Syntactic reach, Semantic reach in software testing
In this tutorial, we will learn about the followings.
- Test paths, Example of test paths.
- Example of simple paths.
- SESE graphs.
- Visit, Tour.
- Syntactic reach, Semantic reach.
Test-Path
A test path is a path that starts with initial node and ends with a final ending node. The basic purpose to understand the test paths is to represent the execution of test cases.
There are two main points to keep in mind that
- There can be multiple test cases for some test paths.
- There can be no test cases for some test paths.
Note that every test case executes only one test path in the graph.
Example of test paths
For example, there are four test paths in the figure below;
[ 0, 1, 3, 4, 6 ], [ 0, 1, 3, 5, 6 ], [ 0, 2, 3, 4, 6 ], [ 0, 2, 3, 5, 6 ]
Example of simple paths
For example, there are four test paths in the figure below;
[ 0, 1, 3, 4, 6 ]
SESE graphs
SESE graph is the single entry and single exit graph. All test paths must start at a single node and must end at another node.
Visit
A visit is a test path that visits the node if the node is in given path. Similarly, a test path is a path that visits an edge if the edge is in the path. So we can say that visit is actually a visit of nodes and edges.
Example of Visits
Visits nodes in the figure are 0, 1, 3, 4, 6
Visits edges in the figure are (0, 1), (1, 3), (3, 4), (4, 6)
Tour
A test path tours sub-path if sub-path is a sub-path of test path.
Example of Tours sub-paths
[0, 1, 3], [1, 3, 4], [3, 4, 6], [0, 1, 3, 4], [1, 3, 4, 6]
Syntactic reach
Syntactic reach represents that sub-path exists in the graph.
Semantic reach
Semantic reach represents that a test case exists that can execute that sub-path.