Products:
Compendium-TA
A modelling tool
Email Control Center
Free - Control Outlook
URL Control Center
Free url manager
Perl Path Analysis
Free Testing Tool
Test Utilities in Excel
Free Testing Utilities
Test Data Utilities
Free Test Data Utilities
ForceWindowVisible
Free System Util
Compendium Developments Software Testing Reviews, Essays and Tools
 
Web site

 

Perl Path Analysis Examples

[Index] [FAQ] [Examples] [Critique]

This page illustrates the examples in the downloadable archive. As you can see the simple algorithm for loop detection used by the script generates a lot of paths for the nested loop examples.

Pairs1 - a general flow graph with basic selections

Input
pairs1.txt
Model Output
outputpairs1.txt
- 0
0 1
1 2
1 3
3 9
9 4
3 5
5 6
5 7
7 8
7 9
- 0 1 2
- 0 1 3 9 4
- 0 1 3 5 6
- 0 1 3 5 7 8
- 0 1 3 5 7 9 4

Pairs2 - a general flow graph with basic selections

Input
pairs2.txt
Model Output
outputpairs2.txt
-  0
0  1
1  2	
1  3
2  4
3  8
3  13
8  9
8  10
9  4
10 4
13 4
4  5
4  6
5  14
6  14
14 7
- 0 1 2 4 5 14 7
- 0 1 2 4 6 14 7
- 0 1 3 8 9 4 5 14 7
- 0 1 3 8 9 4 6 14 7
- 0 1 3 8 10 4 5 14 7
- 0 1 3 8 10 4 6 14 7
- 0 1 3 13 4 5 14 7
- 0 1 3 13 4 6 14 7

Loop - a simple loop

As you can see the loop is traversed twice by the script's algorithm. 

Input
loop.txt
Model Output
outputloop.txt
- 1
1 2
2 3
2 5
3 4
5 7
6 5
7 4
7 6
- 1 2 3 4
- 1 2 5 7 4
- 1 2 5 7 6 5 7 4
- 1 2 5 7 6 5 7 6 5 7 4

Nested Loop - a simple nested loop

Input
nestedloop.txt
Model Output
outputnest.txt
- 1
1 2
1 3
3 4
4 5
5 7
7 4
5 6
6 8
8 3
6 9
2 9
- 1 2 9
- 1 3 4 5 7 4 5 7 4 5 6 8 3 4 5 6 9
- 1 3 4 5 7 4 5 7 4 5 6 9
- 1 3 4 5 7 4 5 6 8 3 4 5 7 4 5 7 4 5 6 8 3 4 5 6 9
- 1 3 4 5 7 4 5 6 8 3 4 5 7 4 5 7 4 5 6 9
- 1 3 4 5 7 4 5 6 8 3 4 5 7 4 5 6 8 3 4 5 7 4 5 7 4 5 6 9
- 1 3 4 5 7 4 5 6 8 3 4 5 7 4 5 6 8 3 4 5 7 4 5 6 9
- 1 3 4 5 7 4 5 6 8 3 4 5 7 4 5 6 8 3 4 5 6 9
- 1 3 4 5 7 4 5 6 8 3 4 5 7 4 5 6 9
- 1 3 4 5 7 4 5 6 8 3 4 5 6 9
- 1 3 4 5 7 4 5 6 9
- 1 3 4 5 6 8 3 4 5 7 4 5 7 4 5 6 8 3 4 5 6 9
- 1 3 4 5 6 8 3 4 5 7 4 5 7 4 5 6 9
- 1 3 4 5 6 8 3 4 5 7 4 5 6 8 3 4 5 7 4 5 7 4 5 6 9
- 1 3 4 5 6 8 3 4 5 7 4 5 6 8 3 4 5 7 4 5 6 9
- 1 3 4 5 6 8 3 4 5 7 4 5 6 8 3 4 5 6 9
- 1 3 4 5 6 8 3 4 5 7 4 5 6 9
- 1 3 4 5 6 8 3 4 5 6 9
- 1 3 4 5 6 9

3 Nested Loop (1) - a 3 way nested loop

Input
3nested.txt
Model Output
output3nest.txt
- 1
1 2
1 3
3 4
4 3
4 5
5 3
5 6
6 3
6 10
138 paths identified, 
please see the file in the archive

3 Nested Loop (2) - a 3 way nested loop with additional branch

This highlights the effects of combinatorial explosion in testing.

Input
3nested2.txt
Model Output
output3nest2.txt
- 1
1 2
1 3
3 4
4 3
4 5
4 7
7 6
5 3
5 6
6 3
6 10
2,971 paths identified,
please see the file in the archive