Rigorous Testing by Merging Structural and Behavioral UML Representations Presented by Chin-Yi Tsai.

Slides:



Advertisements
Similar presentations
DETAILED DESIGN, IMPLEMENTATIONA AND TESTING Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Advertisements

White Box and Black Box Testing Tor Stålhane. What is White Box testing White box testing is testing where we use the info available from the code of.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Nov R McFadyen1 A Traditional Software Development Process Unit test Integration test System test Detailed design Architectural design Analysis.
Object-Oriented Analysis and Design
Introduction To System Analysis and Design
Software Testing and Quality Assurance
Creating Architectural Descriptions. Outline Standardizing architectural descriptions: The IEEE has published, “Recommended Practice for Architectural.
Software Testing and Quality Assurance
© Copyright Eliyahu Brutman Programming Techniques Course.
1 Scenario-based Analysis of UML Design Class Models Lijun Yu October 4th, 2010 Oslo, Norway.
Test Design Techniques
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Introduction To System Analysis and design
Software Systems Verification and Validation Laboratory Assignment 3
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Class Specification Implementation Graph By: Njume Njinimbam Chi-Chang Sun.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Overview of Software Testing 07/12/2013 WISTPC 2013 Peter Clarke.
Introduction to Software Testing
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Ch6: Software Verification. 1 Decision table based testing  Applicability:  Spec. is described by a decision table.  Tables describe:  How combinations.
Introduction To System Analysis and Design
Object-Oriented Analysis and Design An Introduction.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
1 Software Testing. 2 Path Testing 3 Structural Testing Also known as glass box, structural, clear box and white box testing. A software testing technique.
Composition of UML Described Refactoring Rules Presented by Chin-Yi Tsai.
Software Testing Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
ANALYSIS - II REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
9-1 © Prentice Hall, 2007 Chapter 9: Analysis Classes Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
TAL7011 – Lecture 4 UML for Architecture Modeling.
Verification of behavioural elements of UML models using B Truong, Ninh-Thuan and Souquieres, Jeanine In Proceedings of the 2005 ACM Symposium on.
What to remember from Chap 13 (Logical architecture)
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
What is Object-Oriented?  Organization of software as a collection of discreet objects that incorporate both data structure and behavior.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Formal Methods.
Requirements Engineering-Based Conceptual Modelling From: Requirements Engineering E. Insfran, O. Pastor and R. Wieringa Presented by Chin-Yi Tsai.
程建群 博士 (Dr. Jason Cheng) 年 03 月 Software Engineering Part 08.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
7-1 © Prentice Hall, 2007 Topic 7: Analysis Classes Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
SAFEWARE System Safety and Computers Chap18:Verification of Safety Author : Nancy G. Leveson University of Washington 1995 by Addison-Wesley Publishing.
Chapter 3: Introducing the UML
Dynamic Testing.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
CS223: Software Engineering Lecture 26: Software Testing.
 Sequence Diagrams Introduction.  Sequence Diagrams  Review Schedule Sheridan.
Analysis Classes Unit 5.
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
Software Testing.
Rekayasa Perangkat Lunak Part-13
Software Engineering (CSI 321)
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
Structural testing, Path Testing
Chapter 10: Process Implementation with Executable Models
Object-Oriented Analysis
Interactions.
Introduction To System Analysis and Design PART 2
Chapter 20 Object-Oriented Analysis and Design
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Software Testing.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Presentation transcript:

Rigorous Testing by Merging Structural and Behavioral UML Representations Presented by Chin-Yi Tsai

2 Outline Introduction Introduction Background and Related Work Background and Related Work An Integrated Testing Approach An Integrated Testing Approach Conclusion Conclusion

3 Introduction Testing of design models usually consists of walk-throughs and inspections both of which lack the rigor of systematic testing. Testing of design models usually consists of walk-throughs and inspections both of which lack the rigor of systematic testing. Test adequacy criteria for UML model help define necessary objective during the process of test creation. Test adequacy criteria for UML model help define necessary objective during the process of test creation. Test criteria are specific to a particular UML view (class diagram, collaboration diagram, sequence diagram) Test criteria are specific to a particular UML view (class diagram, collaboration diagram, sequence diagram) UML views in isolation can not provide a representation of the cross notational aspects in UML. UML views in isolation can not provide a representation of the cross notational aspects in UML. To integrate two complementary views of UML To integrate two complementary views of UML Structural views through Class Diagrams Structural views through Class Diagrams Behavioral views through Sequence Diagram Behavioral views through Sequence Diagram

4 Introduction (cont ’ d) A new graph that encapsulates the many paths that exist between objects via their method calls as directed acyclic graph (OMDAG). A new graph that encapsulates the many paths that exist between objects via their method calls as directed acyclic graph (OMDAG). Object method execution table (OMET) that captures both execution sequence and associated attribute values by merging the UML views. Object method execution table (OMET) that captures both execution sequence and associated attribute values by merging the UML views. Use information from class diagram and sequence diagram to derive and execute tests that satisfy test adequacy criteria for both structural and behavioral views. Use information from class diagram and sequence diagram to derive and execute tests that satisfy test adequacy criteria for both structural and behavioral views.

5 Introduction (cont ’ d) 1. Extraction of attributes and parameters from Class Diagram (class diagram) 2. The transformation of Sequence Diagram into OMDAG (sequence diagram) 3. An algorithm that merges the structural and behavioral representations into an OMET

6 Background and Related Work Binder [3] described generic code test requirements that can be derived from UML models. Outt and Ab-durazik [8] developed a technique for generating test cases for code from a restricted form of UML State Diagrams. Abdurazik and Outt [1] also developed test criteria based on Collaboration Diagrams for static and dynamic testing of code. Labiche and Briand [4] describe the TOTEM (Testing Object orienTed systEms with the Unied Modeling Language) system test methodology. In Scheetz et al. [10] an approach to generating system (black box) test cases from UML Class Diagrams is described.

7 UML Testing Criteria Class Diagram Criteria Class Diagram Criteria Association-End Multiplicity Criterion Association-End Multiplicity Criterion Given a test set T and a System Model SM, T must cause each representative multiplicity-pair in SM to be created. Given a test set T and a System Model SM, T must cause each representative multiplicity-pair in SM to be created. All class relation All class relation Generation Criterion Generation Criterion Given a test set T and a Systems Model SM, T must cause every specialization in a generalization to be created. Class hierarchical structure Class Attribute Criterion Class Attribute Criterion Give a test set T, a System Model SM, and a class C, T must cause a set of representative attribute value combinations in each instance of class C to be created. Internal structure of each class Internal structure of each class

8 UML Testing Criteria Collaboration Diagram Criteria Collaboration Diagram Criteria Condition Coverage Criteria Condition Coverage Criteria Give a test set T and Collaboration Diagram CD, T must cause each condition in each decision to evaluate to both TRUE and FALSE. Full Predicate Coverage Criteria Full Predicate Coverage Criteria All Message Paths Criteria All Message Paths Criteria All possible sequences in the sequence diagram All possible sequences in the sequence diagram Collection Coverage Criteria Collection Coverage Criteria

9 An Integrated Testing Approach This testing method consists of the following steps: This testing method consists of the following steps: 1. Identify attribute/parameter partitions for all the structural elements in the design. (Outcome: Coverage items for the attribute and method parameters.) 2. Transform Sequence Diagrams into OMDAGS. (Outcome: OMDAGS.) 3. Generate paths through OMDAGS. 4. Traverse paths in OMDAGs, select and assign attribute/parameter values from partitions based on objects in OMDAG path. 5. Record results of steps 3 and 4 in object method execution table (OMET). 6. Generate and execute test cases and determine coverage of criteria using [2].

10 Partitions for the Structural Representation Partitions, including boundary-value partitions are determined by either OCL or by domain knowledge. Partitions, including boundary-value partitions are determined by either OCL or by domain knowledge.

11 The Object Method Directed Acyclic Graph as a Behavioral Representation The OMDAG is created by The OMDAG is created by Associating methods in the Sequence Diagram with their originating objects Associating methods in the Sequence Diagram with their originating objects Main:deal(), Deler:return() Main:deal(), Deler:return() Traversing the Sequence Diagram from beginning to end, showing choices and conditions for method execution Traversing the Sequence Diagram from beginning to end, showing choices and conditions for method execution

12 OMDAG Conditional statementnesting

13 A Test Generation and Execution Algorithm The partitions for attribute and method parameter values and the OMDAG The partitions for attribute and method parameter values and the OMDAG To combine them into test sequences To combine them into test sequences Traversing the OMDAG Traversing the OMDAG Selecting appropriate attribute and parameter values for object instantiations that would cause the desired test sequence to execute Selecting appropriate attribute and parameter values for object instantiations that would cause the desired test sequence to execute

14 Traverse the OMDAG Traverse the OMDAG P = P 1, …, P n P = P 1, …, P n Determine objects and values to execute paths Determine objects and values to execute paths When all tests have been defined in the OMET, to evaluate … When all tests have been defined in the OMET, to evaluate …

15 Determine object and values to execute paths Determine which active objects are needed to execute P i Determine which active objects are needed to execute P i Create a series of constructor calls Create a series of constructor calls pre(P i ) pre(P i ) preseq(P i ) preseq(P i ) Simulate the path p i one node at a time and select and record attribute and parameter value in the OMET Simulate the path p i one node at a time and select and record attribute and parameter value in the OMET Analysis the exception Analysis the exception

16 A Simple Example

17 OMDAG path P1 = 1 -> 2c -> 3c -> 4 -> 5 -> 5.1 -> 5.2 -> 5.3 -> 5.4 -> 6 -> 7 ->7.1 -> 7.2 -> 8a -> 8.1 a -> 8.2a -> 8.2.1a -> 8.2.2a -> 8.3a ->9a ->10a ->11 -> 12 Determine pre(P) Need an instance of the MainWindow preseq(P) require an instance of MW1 of MainWindow

18 OMET Analyze the coverage using the testing criteria

19 Conclusion The test generation algorithm relies upon boundaries and partitions. The test generation algorithm relies upon boundaries and partitions. This information needs to be provided in the UML model This information needs to be provided in the UML model The OMET is the key artifact that is created by merging the Sequence and Class Diagrams. The OMET is the key artifact that is created by merging the Sequence and Class Diagrams. The OMET can reveal architectural problems or logical errors. The OMET can reveal architectural problems or logical errors. Use the OMET to analyze the dynamic behavior of program before it is implemented. Use the OMET to analyze the dynamic behavior of program before it is implemented. The OMET could be used to profile a system by extracting statistics concerning function calls, initializations, number of classed, etc. The OMET could be used to profile a system by extracting statistics concerning function calls, initializations, number of classed, etc.