Coverage Criteria for Testing of Object Interactions in Sequence Diagrams Atanas (Nasko) Rountev Scott Kagan Jason Sawin Ohio State University.

Slides:



Advertisements
Similar presentations
Iterative Rounding and Iterative Relaxation
Advertisements

ASSUMPTION HIERARCHY FOR A CHA CALL GRAPH CONSTRUCTION ALGORITHM JASON SAWIN & ATANAS ROUNTEV.
A Survey of Program Slicing Techniques A Survey of Program Slicing Techniques Sections 3.1,3.6 Swathy Shankar
School of EECS, Peking University “Advanced Compiler Techniques” (Fall 2011) SSA Guo, Yao.
Introduction to Computer Science 2 Lecture 7: Extended binary trees
Min Chen School of Computer Science and Engineering Seoul National University Data Structure: Chapter 9.
22C:19 Discrete Structures Trees Spring 2014 Sukumar Ghosh.
Sequence Diagram Generation & Validation MSE First Presentation Samer Saleh Advisor: Bill Hankley.
Junction Trees And Belief Propagation. Junction Trees: Motivation What if we want to compute all marginals, not just one? Doing variable elimination for.
Binary Trees, Binary Search Trees CMPS 2133 Spring 2008.
Lectures on Network Flows
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
GS 540 week 6. HMM basics Given a sequence, and state parameters: – Each possible path through the states has a certain probability of emitting the sequence.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Regression Test Selection for AspectJ Software Guoqing Xu and Atanas.
Matching Polytope, Stable Matching Polytope Lecture 8: Feb 2 x1 x2 x3 x1 x2 x3.
Data Structures Using C++ 2E Chapter 11 Binary Trees and B-Trees.
Chapter 18 Testing Conventional Applications
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Data Compression Basics & Huffman Coding
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE The trees.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Static Control-Flow Analysis for Reverse Engineering of UML Sequence Diagrams Atanas (Nasko) Rountev Ohio State University with Olga Volgin and Miriam.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University STATIC ANALYSES FOR JAVA IN THE PRESENCE OF DISTRIBUTED COMPONENTS AND.
PRESTO Research Group, Ohio State University Interprocedural Dataflow Analysis in the Presence of Large Libraries Atanas (Nasko) Rountev Scott Kagan Ohio.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Binary Decision Diagrams (BDDs)
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
Chapter 19: Binary Trees. Objectives In this chapter, you will: – Learn about binary trees – Explore various binary tree traversal algorithms – Organize.
Huffman Codes. Encoding messages  Encode a message composed of a string of characters  Codes used by computer systems  ASCII uses 8 bits per character.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Data Structures and Algorithms Lecture (BinaryTrees) Instructor: Quratulain.
Binary Trees, Binary Search Trees RIZWAN REHMAN CENTRE FOR COMPUTER STUDIES DIBRUGARH UNIVERSITY.
The Selection Problem. 2 Median and Order Statistics In this section, we will study algorithms for finding the i th smallest element in a set of n elements.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Software Engineering Research Group, Graduate School of Engineering Science, Osaka University A Slicing Method for Object-Oriented Programs Using Lightweight.
Technology Mapping. 2 Technology mapping is the phase of logic synthesis when gates are selected from a technology library to implement the circuit. Technology.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Foundation of Computing Systems
Lossless Decomposition and Huffman Codes Sophia Soohoo CS 157B.
5/7/03ICSE Fragment Class Analysis for Testing of Polymorphism in Java Software Atanas (Nasko) Rountev Ohio State University Ana Milanova Barbara.
1 Test Coverage Coverage can be based on: –source code –object code –model –control flow graph –(extended) finite state machines –data flow graph –requirements.
Object Naming Analysis for Reverse- Engineered Sequence Diagrams Atanas (Nasko) Rountev Beth Harkness Connell Ohio State University.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 18.
CS223: Software Engineering Lecture 26: Software Testing.
HUFFMAN CODES.
Control Flow Testing Handouts
Atanas (Nasko) Rountev Ohio State University
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
Greedy Technique.
Outline of the Chapter Basic Idea Outline of Control Flow Testing
Lectures on Network Flows
Structural testing, Path Testing
White-Box Testing.
UML dynamic Modeling (Behavior Diagram)
Analysis and design of algorithm
Spatial Online Sampling and Aggregation
White-Box Testing.
SAT-Based Area Recovery in Technology Mapping
3.5 Minimum Cuts in Undirected Graphs
Chapter 11 Data Compression
Sungho Kang Yonsei University
Data Structure and Algorithms
Interactive Exploration of Reverse-Engineered UML Sequence Diagrams
George Mason University
Analysis of Algorithms CS 477/677
Presentation transcript:

Coverage Criteria for Testing of Object Interactions in Sequence Diagrams Atanas (Nasko) Rountev Scott Kagan Jason Sawin Ohio State University

UML Sequence Diagrams Shows messages exchanged among objects Contains control information relevant to message passing

Sequence Diagrams and Testing Object interaction testing Coverage criteria for sequence diagrams  all paths, all branches, etc. Most existing work utilizes the all paths criterion

Sequence Diagrams and Testing Most existing work focuses on design time diagrams Diagrams can also be reverse engineered from code  more paths due to less abstraction Do existing sequence diagram based testing approaches generalize to reverse engineered diagrams?  should the all paths criterion be considered?

Our Work Investigated 4 different coverage criteria for reverse engineered sequence diagrams  defined each criterion in terms of an RCFG tree  developed a method for comparing criteria  performed a comparison of the criteria on real world Java code

RCFG Tree Restricted Control Flow Graph (RCFG)  similar to a traditional CFG  for message passing only RCFG tree represents a sequence diagram  set of all start to end paths for both structures is the same Root RCFG is top level method Edges connecting RCFGs represent method invocations  RCFG n is a child of RCFG m means method m may invoke method n

m1 start end m2 m6 m5 end m4 startm3 m5 end m4 startm3 m6 start end m2 a:Ad:Dc:Cb:B [c1] m3 m2 [c1] m3 m4 [c2] m5 m1 m4 [c2] m5 [c3] m6 m2 start end m4

RCFG Tree Details Straightforward to construct when reverse- engineering sequence diagrams Can be traversed at run time to collect coverage statistics

Coverage Criteria Considered All start to end paths All RCFG paths All RCFG branches All unique branches m1 start end m2 m6 m5 end m4 startm3 m5 end m4 startm3 m6 start end m2

Criterion Comparison Technique Each start to end path corresponds to one test case For each criterion, calculate minimum number of start to end paths required to achieve complete coverage  indirect estimate of testing effort

Minimum Number of Paths All start to end paths: 20 All RCFG paths: 5 All RCFG branches: 3 All unique branches: 2 m1 start end m2 m6 m5 end m4 startm3 m5 end m4 startm3 m6 start end m2

Calculating Minimum Number of Paths All start to end paths  calculate the number of paths from the start node of an RCFG to the end node of the RCFG must consider paths in children  start with the leaves, propagate up to the root All RCFG paths, all RCFG branches, all unique branches  integer linear programming

Valid Path Property If node n represents a method call and edge (m, n) is part of a path p,  p must include an inter-method edge (n, start)  p must include an intra-method edge (n, r) n m r start q

Valid Path Property If node n represents a method call and edge (n, start) is part of a path p,  p must include an intra-method edge (start, q) n m r start q

RCFG Branches Property Consider some set of paths S that satisfies the RCFG branch property  every RCFG edge appears in at least one path n m r start q

Integer Linear Programming Formulation ILP equations encode the valid path property and the RCFG branches property  variables are edge frequencies  constraints each frequency is at least 1 frequency sums are equal (red, green, blue) n m r start q

Proof Obligation Solution to the integer linear programming problem is a frequency count for each edge Need to prove  There exists a set of paths that meets the coverage criterion and has the same edge frequencies  No smaller set of paths satisfies the criterion

Remaining Criteria Integer linear programming formulation  valid paths property  a criterion specific property All unique branches  the sum of the edges frequencies for equivalent edges is at least one All RCFG paths  each edge is covered at least as many times as its local edge frequency

Experimental Study Implemented as part of the RED tool (Reverse Engineering of sequence Diagrams) Implementation used lp_solve linear programming tool Input code:  code from the Java standard libraries  1104 RCFG trees  average 36 RCFGs per tree

Future Work Implement dynamic analyses for obtaining coverage statistics Measure coverage achieved by real world test suites