-->

Types of Path Instrumentation in Software Testing

Types of Path Instrumentation

Interpretive Trace Program:
An Interpretive Trace Program is the one that executes every statement in order, and records the intermediate values of all calculations, the statement labels traversed etc.
If we run the tested routine under a trace, then we have all the information needed to confirm the outcome and furthermore, to confirm that it was achieved by the intended path
The trouble with traces is that they give us far more information than we need
In fact, the typical trace program provides so much information that confirming the path from its massive output dump is more work than simulating the computer by hand to confirm the path
Traversal Marker or Link Marker:
A simple and effective form of instrumentation is called a Traversal Marker or Link Marker
Name every link by a lower case letter
Instrument the links so that the links name is recorded when the link is executed
The succession of letters produced in going form the routines entry to its exit should, if there are no bugs, exactly correspond to the path name
Why single link markers aren't Enough:
 Unfortunately, a single link marker may not do the trick because links can be chewed by open bugs
We intended to traverse the 'i' km path. but because of a GOTO in the middle of the 'm' link, we go to process B
If conditional correctness is against us, the outcomes will be the same and we won't know about the bug
Two Link Marker Method
The solution to the problem of single link marker method is to implement two markers per link, one at the beginning of each link and one at the end
The two link markers now specify the path name and confirm both the beginning and end of the link

Link Counter
A less disruptive (and less informative) instrumentation method is based on outcomes
Instead of a unique link name to be pushed into a string when the link traversed, we simply increment a link counter, we now confirm that the path length is expected
The same problem that led tus to double link markers also leads us to double link counters

Related Posts

1 comment

Post a Comment

Subscribe Our Newsletter