1 Software Testing and Quality Assurance Lecture 24 – Testing Interactions (Chapter 6)

Slides:



Advertisements
Similar presentations
Class Testing ECEN5033 University of Colorado. January 27, 2002 ECEN5033 University of Colorado -- Class Testing 2 Overview Class Testing Testing Interactions.
Advertisements

1 Software Testing and Quality Assurance Lecture 13 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object- Oriented Software)
Object-Oriented Analysis and Design
QBM117 Business Statistics Statistical Inference Sampling 1.
Lecture 12 Reengineering Computer-aided Software Engineering Cleanroom Software Engineering.
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)
Software Testing and Quality Assurance
1 Software Testing and Quality Assurance Lecture 10 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
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 Quality Assurance
Software Testing and Quality Assurance
Software Testing and Quality Assurance
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
1 Software Testing and Quality Assurance Lecture 30 - Introduction to Software Testing.
January 27, 2002 ECEN5033 University of Colorado -- Class Testing 1 Adequacy of a Class Test Suite Ideally – exhaustively test each class Practically –
Run-Time Storage Organization
Collaboration Diagrams. Example Building Collaboration Diagrams.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
1 Software Testing and Quality Assurance Lecture 20 – Class Testing Basics (Chapter 5, A Practical Guide to Testing Object- Oriented Software)
1 Software Testing and Quality Assurance Lecture 30 – Testing Systems.
© Copyright Eliyahu Brutman Programming Techniques Course.
1 Software Testing and Quality Assurance Lecture 25 – Testing Interactions (Chapter 6)
Lecture Slides Elementary Statistics Twelfth Edition
ECE122 L17: Method Development and Testing April 5, 2007 ECE 122 Engineering Problem Solving with Java Lecture 17 Method Development and Testing.
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 9 Functional Testing
Software Integration and Documenting
January 27, 2002 ECEN5033 University of Colorado -- Class Testing 1 Specifying interactions Remainder of slides assume Operations defined by a class are.
The Design Discipline.
Chapter 5 Normalization of Database Tables
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
RUP Implementation and Testing
Chapter 8 – Software Testing Lecture 1 1Chapter 8 Software testing The bearing of a child takes nine months, no matter how many women are assigned. Many.
1 SAD2 - UML 4 th Lecture Class Diagram in Construction Phase Patterns Case Study Lecturer: Dr Dimitrios Makris
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 4th Edition Copyright © 2012 John Wiley & Sons, Inc. All rights.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
A performance evaluation approach openModeller: A Framework for species distribution Modelling.
1/19/00 Survey Methodology Sampling EPID 626 Lecture 2.
IBM Software Group ® Overview of SA and RSA Integration John Jessup June 1, 2012 Slides from Kevin Cornell December 2008 Have been reused in this presentation.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
© 2005 Prentice Hall9-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Lecture 6: Structural Modeling
Software Testing and Quality Assurance Software Quality Assurance 1.
Architectural Design of Distributed Applications Chapter 13 Part of Design Analysis Designing Concurrent, Distributed, and Real-Time Applications with.
Design Jon Walker. More UML ● What is UML again?
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Chapter 8 Lecture 1 Software Testing. Program testing Testing is intended to show that a program does what it is intended to do and to discover program.
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.
CHAPTER SIX Reducing Program Complexity General Sub Procedures and Developer-defined Functions.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Software Testing and Quality Assurance Testing Interactions.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
OOAD UNIT V B RAVINDER REDDY PROFESSOR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING.
Chapter 7 Classes and Methods III: Static Methods and Variables Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition)
1 Software Testing and Quality Assurance Lecture 17 - Test Analysis & Design Models (Chapter 4, A Practical Guide to Testing Object-Oriented Software)
Fusion Design Overview Object Interaction Graph Visibility Graph Class Descriptions Inheritance Graphs Fusion: Design The overall goal of Design is to.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 14b: Software Testing Techniques Software Engineering: A Practitioner’s Approach, 6/e Chapter.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
Dr. Chen, Data Mining  A/W & Dr. Chen, Data Mining Chapter 3 Basic Data Mining Techniques Jason C. H. Chen, Ph.D. Professor of MIS School of Business.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
1 Sections 6.4 – 6.5 Methods and Variables Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Chapter 5: Structural Modeling
TIM 58 Chapter 8: Class and Method Design
Presentation transcript:

1 Software Testing and Quality Assurance Lecture 24 – Testing Interactions (Chapter 6)

2 Lecture Outline To understand different types of interactions. Learn techniques on how to select test cases to run.

3 Introduction Object-oriented program comprises a collection of objects that collaborate to solve some problem. Most classes have collaborators: The methods in the class interact with instances of other classes.

4 Introduction The interactions being tested are between objects at runtime. The focus of interaction testing is Ensuring that messaging occurs correctly with objects whose classes have already been tested separately.

5 Object interactions An object interaction is simply a request by one object (the sender) to another (the receiver) to perform one of the receiver’s operations; and all of the processing performed by the receiver to complete the request. Object interactions include: Messages between an object and its components Messages between an object and other objects with which it is associated.

6 Object interactions Partial class testing: In an iterative, incremental development approach, Classes are often developed in stages, these classes are tested to the extent that they are developed.

7 Object interactions: identifying interactions A primitive class is one that can be used without any collaboration with other objects (no need to create instances of any other class). A nonprimitive class is one that requires collaboration with other objects in order to accomplish its objectives.

8 Object interactions: identifying interactions (cont...) Possible collaborations: Parameter: public operation collaborates with an object passed in as an argument (formal parameter). Return: public operation returns an object with which it collaborates. Internal: a method of a class creates an instance of another as part of its implementation. Global: reference to a global instance of some class (undesired).

9 Object interactions: identifying interactions (cont...) Categories of nonprimitive classes based on degree of interaction: Collection classes: maintain references to other classes, but do not collaborate (closely) with them. Collaborating classes: interacts directly with its associated classes  classes that are not collection classes.

10 Object interactions: identifying interactions— collection classes Collection classes: Use objects in their specifications but never actually collaborate with any of them; they never request any services from them. Instead they do one of the following: Store references Create instances Delete instances Examples: lists, stacks, and queues.

11 Object interactions: identifying interactions— collaborating classes Collaborating classes are: Non-primitive classes that are not collection classes. They are classes that use other objects in one or more operations as part of their implementation.

12 Object interactions: identifying interactions— collaborating classes (cont...) Factors that determine the size for testing: Composition and association: During a class test, the interaction of the composing object with its composed attributes is tested. The interaction between an object and its associated objects are tested as successive layers of aggregation are integrated.

13 Object interactions: identifying interactions— collaborating classes (cont...) The number of layers of aggregations created between interaction tests is closely related to the visibility of defects. Object complexity: the more complex the objects, the fewer that should be integrated prior to a round of testing (number of parameters, methods,...).

14 Testing object interactions: testing collection classes Collection classes are tested using techniques for primitive classes: A test driver will create instances that are passed as parameters in messages to a collection being tested. Test cases center around ensuring that those instances are correctly incorporated into and removed from the collection class If defensive design has been used then include negative test cases in the test suite

15 Testing object interactions: testing collaborator classes The complexity of testing a collaborating class is greater than that of testing a collection class or a primitive class. For a collaborator class under test: Identify the collaborating classes Determine the sequence of testing Collaborating classes, Next level of collaboration Then the next level of collaboration and so on

16 Sampling test cases Population: all possible test cases that can be executed A sample is a subset of a population that has been selected based on some probability distribution.

17 Sampling test cases Possibilities for determining which test cases to select Based on probability distribution A probability distribution defines, for each data value in a population, a set of allowable values and the probability that value will be selected. Uniform probability distribution Each value in the population is assigned the same selection probability Probability distribution based on the use profile

18 Sampling test cases (cont...) A stratified sample is a set of samples in which each sample represents a specific subpopulation Example: select a sample of test cases from the use cases of each actor Stratified sample tests are selected from a series of categories.

19 Sampling test cases (cont...) Use of random number generator in sampling Advantage: all values have equal probability Disadvantage: test cases cannot be reproduced (you may let the test driver record the generated values) Example Velocity class, set direction: values between 0 and 359 Class family: a set of classes related by inheritance.

20 Key points Primitive and non-primitive classes. Possible collaborations: parameter, return, internal, global. Categories of non-primitive classes: collection and collaborating classes Factors that determine the size for testing Composition and association: aggregations Object complexity