Path Sensitizing Review Achievable and Unachievable Paths Pragmatic

Path Sensitizing • • • Review: Achievable and Unachievable Paths Pragmatic Observations Heuristic Procedures for Sensitizing Paths Identify Classify Start Path – – The predicates are correlated The predicates are incorrectly classified Your path tracing is faulty There is a bug • If coverage hasn’t been achieved using independent uncorrelated. • If coverage hasn’t been achieved, extend the cases to those that involve dependent predicates. • Last, use correlated, dependent predicates. • Each path will yield a set of inequalities, which must be simultaneously satisfied to force the path.

Path Instrumentation • Coincidental Correctness. • Path instrumentation is what we have to do to confirm that the outcome was achieved by the intended path. • General Strategy – An interpretive trace program, you will recall is one that executes every statement in order and records the intermediate values of all calculations, the statement labels traversed, etc. • Link Markers – A simple and effective form of instrumentation is called a traversal marker or link marker. • Link Counter – The unique link name to be pushed into a string when the link is traversed, we simply increment a link counter.

• The checkout procedure then consists of answering the following questions. – Do the begin link counter values equal the end link counter values for all links? – Do the input link count of every decision equal the sum of the link counts of the output links from that decisions? – Do the sum of the input link counts for a junction equal the output link count for that junctions? – Do the counts match the values you predicted when you designed that test? • Other instrumentation methods – Mark each link by a unique prime number and multiply the link name into a central register. – Use a bit map with a single bit per link and set that bit when the link is traversed. – Use a hash coding scheme over the link names, or calculate an error detecting code over the link names, such as a check sum. – Use your symbolic debugger or trace to give you a trace only of subroutine calls and return. – Set a variable value at the beginning of the link to unique number for that link. • Implementation

Implementation and Application of Path Testing • Integration, Coverage and Paths in Called Components • New Code • Maintenance • Rehosting
- Slides: 4