L9 - Software Testing Quality Assurance and Maintenance...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
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 A basic block has one entry point and one exit point. Note that a basic block may have multiple successors. However, there may not be any jumps into
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern