Activity: Prime Path Coverage CS 4501 / 6501 Software Testing

Slides:



Advertisements
Similar presentations
Path Analysis Why path analysis for test case design?
Advertisements

Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Paul Ammann & Jeff Offutt
Graph Coverage (2).
Graph Coverage Criteria Structural Coverage Criteria : Defined on a graph just in terms of nodes and edges Data Flow Coverage Criteria : Requires a graph.
ICS-171:Notes 4: 1 Notes 4: Optimal Search ICS 171 Summer 1999.
Introduction to Software Testing Chapter 2.1, 2.2 Overview Graph Coverage Criteria Paul Ammann & Jeff Offutt
The Application of Graph Criteria: Source Code  It is usually defined with the control flow graph (CFG)  Node coverage is used to execute every statement.
Terminal Games Theoretical Subtitle. A Simple Game 1: A>B>C 2: B>C>A 3: C>A>C.
1 Routing Algorithms. 2 Outline zBellaman-Ford Algorithm zDijkstra Algorithm.
Degree A F H G B E D C. Adjacent A F H G B E D C.
Types of Number – Multiples, Factors & Primes
Overview Graph Coverage Criteria ( Introduction to Software Testing Chapter 2.1, 2.2) Paul Ammann & Jeff Offutt.
Can you connect the dots as shown without taking your pen off the page or drawing the same line twice.
Expanders via Random Spanning Trees R 許榮財 R 黃佳婷 R 黃怡嘉.
Chapter 10 Graph Theory Eulerian Cycle and the property of graph theory 10.3 The important property of graph theory and its representation 10.4.
Software Testing and Maintenance Lecture 2.1 Overview Graph Coverage
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
11.4 Pythagorean Theorem Definitions Pythagorean Theorem
Introduction to Algorithms All-Pairs Shortest Paths My T. UF.
Source Page US:official&tbm=isch&tbnid=Mli6kxZ3HfiCRM:&imgrefurl=
Control Flow Graphs : The if Statement 1 if (x < y) { y = 0; x = x + 1; } else { x = y; } x >= yx < y x = y y = 0 x = x + 1 if (x < y) { y = 0;
Graph Concepts and Algorithms Using LEDA By Caroline Moore and Carmen Frerichs (252a-at and 252a-ao) each graph in the presentation was created using gw_basic_graph_algorithms.
Time Remaining 20:00.
Graph Concepts Elif Tosun 252a-aa (All graphics created by using demo/graphwin/gw*)
Structural (White-Box) Testing Software Testing Module Dr. Samer Hanna.
Paul Ammann & Jeff Offutt
Data Flow Testing. Introduction to Software Testing (Ch 2) © Ammann & Offutt 2 Definition of a Graph A set N of nodes, N is not empty A set N 0 of initial.
Buckingham School
Путешествуй со мной и узнаешь, где я сегодня побывал.
EVEN NUMBERS EVEN NUMBERS 1 = prime 2 = prime1 3 = prime 4 = 2 x 22 5 = prime 6 = 2 x 33 7 = prime 8 = 2 x 2 x 24 9 = 3 x 3 10 = 2 x 55.
Paul Ammann & Jeff Offutt
Basic Concepts of Software Testing (2.1 – 2.3)
Great Theoretical Ideas In Computer Science
Prime Numbers.
Paul Ammann & Jeff Offutt
Software Testing and Maintenance 1
Paul Ammann & Jeff Offutt
Graph Coverage Criteria CS 4501 / 6501 Software Testing
Graph: Data Flow Criteria CS 4501 / 6501 Software Testing
Grow these factor bugs, their legs
2 Digit by 2 Digit Multiplication
Paul Ammann & Jeff Offutt
Page 1. Page 2 Page 3 Page 4 Page 5 Page 6 Page 7.
EMIS 8374 Dijkstra’s Algorithm Updated 18 February 2008
Paul Ammann & Jeff Offutt
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Trees Slides are adopted from “Discrete.
Graph Algorithm.
Nodes, Branches, and Loops
Chapter 4 Properties of Regular Languages
Lecture 2- Query Processing (continued)
Graph: Data Flow Coverage Criteria CS 4501 / 6501 Software Testing
Paul Ammann & Jeff Offutt
EDLC(Embedded system Development Life Cycle ).
Graph Coverage Criteria CS 4501 / 6501 Software Testing
Graph Coverage Criteria
Graph Coverage Criteria CS 4501 / 6501 Software Testing
Paul Ammann & Jeff Offutt
Networks Kruskal’s Algorithm
Graph Coverage Criteria
Coursework 1 Due Tuesday, Feb 6, 2007 in the tutorial
HW2: A prime path generator (Due Oct 6th 23:59)
Paul Ammann & Jeff Offutt
George Mason University
Prime Numbers.
The travelling salesman problem
Paul Ammann & Jeff Offutt
Graph Algorithm.
Presentation transcript:

Activity: Prime Path Coverage CS 4501 / 6501 Software Testing

Prime Paths and Simple Paths Simple path that is not subpath of any other simple path Simple path Path that does not have an internal loop

List Test Requirements for Prime Paths 1 3 5 6 2 7 4 Start with path of length = 0 [1] [2] [3] [4] [5] [6]! [7] Extend path to length = 1 [1, 2] [1, 3] [2, 3] [2, 7] [3, 4] [3, 5] [4, 3] [4, 5] [5, 6]! [7, 5] Extend path to length = 2 [1, 2, 3] [1, 2, 7] [1, 3, 4] [1, 3, 5] [2, 3, 4] [2, 3, 5] [2, 7, 5] [3, 4, 3]* [3, 4, 5] [3, 5, 6]! [4, 3, 4]* [4, 3, 5] [4, 5, 6]! [7, 5, 6]! ! Indicate a final node, no more extending * Indicate cycle (or loop), no more extending

List Test Requirements for Prime Paths Extend path to length = 2 [1, 2, 3] [1, 2, 7] [1, 3, 4] [1, 3, 5] [2, 3, 4] [2, 3, 5] [2, 7, 5] [3, 4, 3]* [3, 4, 5] [3, 5, 6]! [4, 3, 4]* [4, 3, 5] [4, 5, 6]! [7, 5, 6]! Extend path to length = 3 [1, 2, 3, 4] [1, 2, 3, 5] [1, 2, 7, 5] [1, 3, 4, 5] [1, 3, 5, 6]! [2, 3, 4, 5] [2, 3, 5, 6]! [2, 7, 5, 6]! [3, 4, 5, 6]! [4, 3, 5, 6]! Do not include [1, 3, 4, 3] since it is not a simple path and thus is not a prime path Do not include [2, 3, 4, 3] 1 3 5 6 2 7 4 ! Indicate a final node, no more extending * Indicate cycle (or loop), no more extending (from previous page)

List Test Requirements for Prime Paths (from previous page) Extend path to length = 3 [1, 2, 3, 4] [1, 2, 3, 5] [1, 2, 7, 5] [1, 3, 4, 5] [1, 3, 5, 6]! [2, 3, 4, 5] [2, 3, 5, 6]! [2, 7, 5, 6]! [3, 4, 5, 6]! [4, 3, 5, 6]! Extend path to length = 4 [1, 2, 3, 4, 5] [1, 2, 3, 5, 6]! [1, 2, 7, 5, 6]! [1, 3, 4, 5, 6]! [2, 3, 4, 5, 6]! Extend path to length = 5 [1, 2, 3, 4, 5, 6]! 1 3 5 6 2 7 4 ! Indicate a final node, no more extending * Indicate cycle (or loop), no more extending

Determine Prime Paths Consider paths with ! and * (ignore the remaining paths) Start with the longest path, cross out paths that are its subpaths Paths in are prime paths [1, 2] [1, 3] [2, 3] [2, 7] [3, 4] [3, 5] [4, 3] [4, 5] [5, 6]! [7, 5] [1, 2, 3] [1, 2, 7] [1, 3, 4] [1, 3, 5] [2, 3, 4] [2, 3, 5] [2, 7, 5] [3, 4, 3]* [3, 4, 5] [3, 5, 6]! [4, 3, 4]* [4, 3, 5] [4, 5, 6]! [7, 5, 6]! [1, 2, 3, 4] [1, 2, 3, 5] [1, 2, 7, 5] [1, 3, 4, 5] [1, 3, 5, 6]! [2, 3, 4, 5] [2, 3, 5, 6]! [2, 7, 5, 6]! [3, 4, 5, 6]! [4, 3, 5, 6]! [1, 2, 3, 4, 5] [1, 2, 3, 5, 6]! [1, 2, 7, 5, 6]! [1, 3, 4, 5, 6]! [2, 3, 4, 5, 6]! [1, 2, 3, 4, 5, 6]!

Identify Test Paths Test paths For each prime path, check if it starts with an initial node and ends at a final node. If not, extend the path to start with initial nodes and end at final nodes Test paths Already start with initial nodes and end at final nodes. They can already be used as test paths [1, 2, 3, 4, 5, 6]! [1, 2, 3, 5, 6]! [1, 2, 7, 5, 6]! [1, 3, 4, 5, 6]! [1, 3, 5, 6]! [4, 3, 5, 6]! [3, 4, 3]* [4, 3, 4]* [1, 2, 3, 4, 5, 6] [1, 2, 3, 5, 6] [1, 2, 7, 5, 6] [1, 3, 4, 5, 6] [1, 3, 5, 6] [1, 3, 4, 3, 5, 6] [1, 3, 4, 3, 4, 5, 6] Some test paths can tour multiple test requirements