14004 L6 - © D. Deugo, 2003 – 2008 Lecture 6 Towards Testable Interaction Diagrams (A theoretical lecture with few examples…  )

Slides:



Advertisements
Similar presentations
COMET Approach for UML Overview
Advertisements

Software Architecture Design Chapter 12 Part of Design Analysis Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
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.
14004 L5 - © D. Deugo, Lecture 5 Combinational Models (Binder chapter 6)
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Unified Modeling Language
Integration testing Satish Mishra
Introduction To System Analysis and Design
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
1 Software Testing and Quality Assurance Lecture 21 – Class Testing Basics (Chapter 5, A Practical Guide to Testing Object- Oriented Software)
Systems Analysis and Design in a Changing World, Fourth Edition
Software Testing and Quality Assurance
Component-Level Design
Software modeling for embedded systems: static and dynamic behavior.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Software Engineering I Object-Oriented Design
Testing an individual module
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Software Testing and QA Theory and Practice (Chapter 10: Test Generation from FSM Models) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory.
Chapter 13 & 14 Software Testing Strategies and Techniques
Chapter 7: The Object-Oriented Approach to Requirements
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
1 Object-Oriented Testing CIS 375 Bruce R. Maxim UM-Dearborn.
1 © 2005 course technology University Of Palestine Chapter 6 Storyboarding the User’s Experience.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Overview of Software Testing 07/12/2013 WISTPC 2013 Peter Clarke.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
© 2005 course technology1 1 1 University Of Palestine UML for The IT Business Analyst A practical guide to Object Oriented Requirement Gathering Hoard.
Software Engineering Research paper presentation Ali Ahmad Formal Approaches to Software Testing Hierarchal GUI Test Case Generation Using Automated Planning.
SE: CHAPTER 7 Writing The Program
1 Devon M. Simmonds University of North Carolina, Wilmington CSC450 Software Engineering WorkFlow Modeling with Activity Diagrams.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
Chapter 12: Design Phase n 12.1 Design and Abstraction n 12.2 Action-Oriented Design n 12.3 Data Flow Analysis n Data Flow Analysis Example n
Software Construction Lecture 18 Software Testing.
CS 4850: Senior Project Fall 2014 Object-Oriented Design.
CSE 432: Design Patterns Introduction What’s a Pattern? What’s an Idiom? According to Alexander, a pattern: –Describes a recurring problem –Describes the.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
♦ Use Case Model  Detailled use case - Important  Use case diagram- Refactoring Use case diagram  > 1 Last Lectures.
What to remember from Chap 13 (Logical architecture)
CS 8532: Advanced Software Engineering Dr. Hisham Haddad Overview of Object-Oriented Design Highlights of OOD Concepts, Components, and Process.
Eliciting Integration Scenarios As discussed during Meeting
Understanding the Behavior of Java Programs Tarja Systa Software Systems Lab. Tampere Univ. Sookmyung Women’s Univ. PSLAB Choi, yoon jeong.
Ch- 8. Class Diagrams Class diagrams are the most common diagram found in modeling object- oriented systems. Class diagrams are important not only for.
Systems Analysis and Design in a Changing World, Fourth Edition
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
Chapter 3: Introducing the UML
8.1 8 Algorithms Foundations of Computer Science  Cengage Learning.
Rigorous Testing by Merging Structural and Behavioral UML Representations Presented by Chin-Yi Tsai.
CSIS 4850: CS Senior Project – Spring 2009 CSIS 4850: Senior Project Spring 2009 Object-Oriented Design.
Object and Class Structuring Chapter 9 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
Fusion Design Overview Object Interaction Graph Visibility Graph Class Descriptions Inheritance Graphs Fusion: Design The overall goal of Design is to.
Documenting an Architecture 10 pages, half pictures.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Activity & Class Modeling Labs Discussion p3 T120B pavasario sem.
OBJECT-ORIENTED TESTING. TESTING OOA AND OOD MODELS Analysis and design models cannot be tested in the conventional sense. However, formal technical reviews.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Software Testing.
Software Engineering (CSI 321)
Unified Modeling Language
Week 10: Object Modeling (1)Use Case Model
Chapter 13 & 14 Software Testing Strategies and Techniques
Object-Oriented Design
Dynamic Modeling Lecture # 37.
Review CSE116 2/21/2019 B.Ramamurthy.
Design Yaodong Bi.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

14004 L6 - © D. Deugo, 2003 – 2008 Lecture 6 Towards Testable Interaction Diagrams (A theoretical lecture with few examples…  )

24004 L6 - © D. Deugo, 2003 – 2008 Where are we at wrt Binder? We have covered: Ch1: Frame of mind for testing Ch 3: Terminology and limitations of testing Ch 5: Test models Section 8.3: Testing UC diagram Ch 14: System scope (patterns) Ch 6: Combinational Models We start today by reading in Section 8.5 that Sequence diagrams of UML are a poor model for developing tests: –“where a properly constructed flow graph will show all possible activation sequences, a sequence diagram is required to show only a single collaboration.”

34004 L6 - © D. Deugo, 2003 – 2008 Testing MSCs? Two questions must be first addressed: –Which MSCs should we test? –How do we generate tests from an MSC? We have argued for traceability between UCs, UCMs and MSCs. –But whereas unbound UCMs are still at system scope, bound UCMs and MSCs introduce classes and instances. This leads to two different testing viewpoints: 1.We must develop tests for detailed scenarios. 2.We must develop test for the classes whose instances are involved in these scenarios. 3.Once we will have code, we will first test the classes (unit testing) and then, and only then, will we execute the tests that proceed from scenarios (integration testing). –The question stands: how to device tests from interaction diagrams. »First decision: to use or not to use consolidated diagrams?

44004 L6 - © D. Deugo, 2003 – 2008 Overview of Gomaa’s COMET Problem Description Use Case Model Static Model of the Problem Domain Object Structuring Dynamic Model –UML ’s sequence and/or collaboration diagrams (augmented) –Statechart Model Consolidation (start of OOD according to Gomaa) Subsystem structuring Structuring System into Tasks –Consideration of Synchronization and Distributed Control Design of Information Hiding Classes Detailed Design Target System Configuration Performance Analysis HDL DDL

54004 L6 - © D. Deugo, 2003 – 2008 Consolidation Consolidation means role integration: –Consolidation can be thought of as superimposition of interaction diagrams »Merging all the scenarios!! –Consolidation can be thought of as the integration of the role state machines associated with a class »Extracting (or synthesizing) a class statechart from all the scenarios in which instances of this class appear. – The use case diagram is very important for such tasks: »We must not forget inter-scenario and inter-UC relationships!!

64004 L6 - © D. Deugo, 2003 – 2008 About Binder’s Integration Patterns Beware!! These patterns are NOT based on MSCs. Instead they pertain to how a tester goes and chooses how to test classes: –Pairwise –All-at-once (BIG BANG) –With respect to dependencies –With respect to layers This is a class-centered viewpoint: we are not there yet!

74004 L6 - © D. Deugo, 2003 – 2008 About Covering Arrays Alan Williams’s approach: –Nice mathematics to come up with the minimal set of permutations of values of a set of parameters to cover all degree n combinations »What looks like a NP-hard problem may not be after all… –Glitches: »If the set of possible values for a parameter gets modified frequently, the method breaks down »The assumption that one can derive an exhaustive set of values for each parameter of the system is problematic: a generative characterization could be more promising but would fall out of this approach.

84004 L6 - © D. Deugo, 2003 – 2008 Binder’s Patterns For Subsystems (chapter 12)

94004 L6 - © D. Deugo, 2003 – 2008 Subsystems Patterns Class Association –Shows how to design a test suite that will exercise the associations defined in a class or object model –Boils down to testing multiplicity of the association… –This is not based on interaction diagrams: postpone for now… Mode Machine –Shows how to model the aggregate state behavior of a cluster and develop a state-based test suite. –Uses FSM-based techniques (ch 6) yet to be discussed… –Boils down to testing consolidated role state machines Controlled Exception –Shows how to design a test suite that will exercise exception handling –The question is why did we separate these scenarios from others… Round-Trip –Shows how to design a test suite that will cover all event-response paths in a sequence diagram –Use UML sequence diagram with minimal branch and loop coverage. »Worth looking at NOW

L6 - © D. Deugo, 2003 – 2008 Round-Trip Scenario Binder (p.579): “Intent: extract a control flow model from a UML sequence diagram and develop a path set that provides minimal branch and loop coverage.” –Why start with a sequence diagram when it is limited to one collaboration?? –What is minimal branch and loop coverage? Consider fig p.580: –A scenario is a path through an interaction diagram –Several errors can occur: p –One advantage: can apply to instances but also to subsystems… –Drawbacks of UML sequence diagrams pp »Don’t handle repetition, recursion and conditions well… »Typically abstracts away parameters… »Does not distinguish inherited messages »Does not handle polymorphism, nor delayed messages –Which ones are relevant to MSCs?

L6 - © D. Deugo, 2003 – 2008 Flow Graph Path Testing Binder’s Round-Trip pattern: –Translate sequence diagram into a flow chart (p.583) –Identify segments: a conditional action ends a segment –Conditions are limited to true/false paths… –Loop predicates are conditions: while vs repeat… –Identify paths: pp »Could lead to combinatorial explosion –Obtain a test suite that exercises every branch – Every loop must be bypassed, or executed one, executed a maximum number of time. –Simple algorithm p to build a table (p.587) –Deal with special cases: polymorphism + exceptions Do we need to do this? –The table format of fig 12.7 p.587 is useful –UCMs handle the rest better than flowcharts!! »Can we tie the path conditions to instances? Why not? –So should we both doing more specific MSC-based tests?