This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Software Testing, Quality Assurance and Maintenance Winter 2010 Lecture 9 — January 22, 2010 Patrick Lam version 1 So far, we’ve seen a number of coverage criteria for graphs, but I’ve been vague about how to actually construct graphs. For the most part, it’s fairly obvious, and you’ve done it on assignments. Graph Coverage for Source Code Let’s see formal definitions. Remember that we first defined the structural criteria: NC, EC, EPC, PPC, SPC, CPC. (Why are ADC, AUC, ADUPC, CRTC, SRTC inapplicable?) Structural Graph Coverage for Source Code Fundamental graph for source code: Control-Flow Graph (CFG). • CFG nodes: zero or more statements; • CFG edges: an edge ( s 1 ,s 2 ) indicates that s 1 may be followed by s 2 in an execution. Basic Blocks. We can simplify a CFG by grouping together statements which always execute together (in sequential programs): x = 5 z = 2 l0 : i f ( z < 17) goto l1 z = z + 1 print (x) goto l0 l1 : nop We use the following definition: Definition 1...
View Full Document
This note was uploaded on 03/19/2010 for the course CS 447 taught by Professor Lam during the Winter '10 term at Waterloo.
- Winter '10