Testing Object-Oriented Applications. Slides copyright 1996, 2001, 2005, 2009 by Roger S. Pressman. For non-profit educational use only

Similar documents
Testing Object-Oriented Applications. Slide Set to accompany. Software Engineering: A Practitioner s Approach, 7/e by Roger S.

Software Engineering Software Testing Techniques

Software Testing Strategies. Slides copyright 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman. For non-profit educational use only

Chapter 14 Software Testing Techniques

Software Testing Strategies. Software Engineering: A Practitionerʼs Approach, 7/e by Roger S. Pressman

Sample Question Paper. Software Testing (ETIT 414)

Lecture 14: Chapter 18!

CHAPTER 5: PRINCIPLES OF DETAILED DESIGN

Testing Web Applications. Slides copyright 1996, 2001, 2005, 2009 by Roger S. Pressman. For non-profit educational use only

User Interface Design. Slide Set to accompany. Software Engineering: A Practitioner s Approach, 7/e by Roger S. Pressman

The Nature of Software. Slides copyright 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman. For non-profit educational use only

Component-Level Design. Slides copyright 1996, 2001, 2005, 2009 by Roger S. Pressman. For non-profit educational use only

User Interface Design. Slides copyright 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman. For non-profit educational use only

Design Concepts. Slide Set to accompany. Software Engineering: A Practitioner s Approach, 7/e by Roger S. Pressman

!"#$%&'()*+,-*,--)./00#'1)2)345"645"%()

CS485/540 Software Engineering Architecture and Component Design (Chs. 9,10)

Slides copyright 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman. For non-profit educational use only

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1

QUIZ #5 - Solutions (5pts each)

Part 5. Verification and Validation

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

Testing. Unit, integration, regression, validation, system. OO Testing techniques Application of traditional techniques to OO software

Chapter 12 (revised by JAS)

Requirements Engineering: Specification & Validation. Software Requirements and Design CITS 4401 Lecture 18

Software testing. Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 23 Slide 1

Verification and Validation. Assuring that a software system meets a user s needs. Verification vs Validation. The V & V Process

Lecture 15 Software Testing

Verification and Validation. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 22 Slide 1

Examination Questions Time allowed: 1 hour 15 minutes

copyright 1996, 2001, 2005 R.S. Pressman & Associates, Inc.

CT41 (ALCCS) SOFTWARE ENGINEERING JUN 2015

Software Testing Techniques

Topic: Software Verification, Validation and Testing Software Engineering. Faculty of Computing Universiti Teknologi Malaysia

Software Engineering: A Practitionerʼs Approach, 7/e by Roger S. Pressman. Slides copyright 1996, 2001, 2005, 2009 by Roger S.

Chapter 9. Software Testing

Black-box Testing Techniques

Level: M.Ed. Credit Hour: 3 (2+1) Semester: Second Teaching Hour: 80(32+48)

R.S. Pressman & Associates, Inc. For University Use Only

Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin

Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 22 Slide 1

SOFTWARE ENGINEERING SOFTWARE VERIFICATION AND VALIDATION. Saulius Ragaišis.

OO design. Classes, Responsibilities, Collaborations (CRC) 13/9/1999 COSC

Chapter 8. Achmad Benny Mutiara

Patterns and Testing

The testing process. Component testing. System testing

An Expert System for Design Patterns Recognition

Slides copyright 1996, 2001, 2005, 2009 by Roger S. Pressman. For non-profit educational use only

Measuring the quality of UML Designs

Requirements Modeling (Ch. 6)

Introduction to Software Engineering

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

Verification and Validation

Software Design And Modeling BE 2015 (w. e. f Academic Year )

Architectural Blueprint

Lecture 8: Chapter 8!

Software Testing. Massimo Felici IF

Darshan Institute of Engineering & Technology for Diploma Studies

ADIKAVI NANNAYA UNIVERSITY B. A Computer Applications / B.Sc Computer Science/B.Sc IT Syllabus Under CBCS w.e.f

3 Product Management Anti-Patterns by Thomas Schranz

Integration Testing Qualidade de Software 2

Software & WebApp Testing. Nisa ul Hafidhoh

Overview. State-of-the-Art. Relative cost of error correction. CS 619 Introduction to OO Design and Development. Testing.

1 Visible deviation from the specification or expected behavior for end-user is called: a) an error b) a fault c) a failure d) a defect e) a mistake

M Introduction to Visual Basic.NET Programming with Microsoft.NET 5 Day Course

Object-Oriented Systems Analysis and Design Using UML

Test design: Part I. Software Testing: INF3121 / INF4121

Introduction to Software Testing Chapter 2.4 Graph Coverage for Design Elements Paul Ammann & Jeff Offutt

Software Testing. Software Testing. in the textbook. Chapter 8. Verification and Validation. Verification Techniques

White Box Testing III

Software Testing Fundamentals. Software Testing Techniques. Information Flow in Testing. Testing Objectives

Part I: Preliminaries 24

Information System Design (IT60105)

MONIKA HEINER.

UNIT 1-UMAL DIAGRAMS. Q.No. Question Competence Level. 1 What is Object Oriented analysis & Design? Remembering BTL1

Objectives. Chapter 19. Verification vs. validation. Topics covered. Static and dynamic verification. The V&V process

Design First ITS Instructor Tool

Department of Information Technology

Test design techniques

In this Lecture you will Learn: Testing in Software Development Process. What is Software Testing. Static Testing vs.

Testing & Debugging TB-1

Component-Level Design. Slides copyright 1996, 2001, 2005, 2009 by Roger S. Pressman (revised by Seung- Hoon Na) For non-profit educational use only

Syllabus for Bachelor of Technology. Computer Engineering. Subject Code: 01CE1303. B.Tech. Year - II

XVIII. Software Testing. Laurea Triennale in Informatica Corso di Ingegneria del Software I A.A. 2006/2007 Andrea Polini

Introduction to Object Oriented Analysis and Design

Verification and Validation

5th World Congress for Software Quality Shanghai, China November 2011

SOFTWARE ENGINEERING IT 0301 Semester V B.Nithya,G.Lakshmi Priya Asst Professor SRM University, Kattankulathur

The Fundamental Testing Process in Practical or Company environment

Student Performance Q&A:

Verification and Validation

Anatomy of a Method. HW3 is due Today. September 15, Midterm 1. Quick review of last lecture. Encapsulation. Encapsulation

Chapter 7 Desain Rekayasa Perangkat Lunak Analysis Modeling. Software Engineering: A Practitioner s Approach by Roger S. Pressman

Introduction to Software Testing

Class Modality. Modality Types. Modality Types. Class Scope Test Design Patterns

[IT6004-SOFTWARE TESTING] UNIT 2

Software Development 2

On UML2.0 s Abandonment of the Actors-Call-Use-Cases Conjecture

CHAPTER 9 DESIGN ENGINEERING. Overview

CHAPTER 4: PATTERNS AND STYLES IN SOFTWARE ARCHITECTURE

Sample Exam Syllabus

Transcription:

Chapter 19 Testing Object-Oriented Applications Slide Set to accompany Software Engineering: A Practitioner s Approach, 7/e by Roger S. Pressman Slides copyright 1996, 2001, 2005, 2009 by Roger S. Pressman For non-profit educational use only May be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering: A Practitioner's Approach, 7/e. Any other reproduction or use is prohibited without the express written permission of the author. All copyright information MUST appear if these slides are posted on a website for student use. (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 1

OO Testing To adequately test OO systems, three things must be done: the definition of testing must be broadened to include error discovery techniques applied to objectoriented analysis and design models the strategy for unit and integration testing must change significantly, and the design of test cases must account for the unique characteristics of OO software. (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 2

Testing OO Models The review of OO analysis and design models is especially useful because the same semantic constructs (e.g., classes, attributes, operations, messages) appear at the analysis, design, and code level Therefore, a problem in the definition of class attributes that is uncovered during analysis will circumvent side affects that might occur if the problem were not discovered until design or code (or even the next iteration of analysis). (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 3

Correctness of OO Models During analysis and design, semantic correctness can be asesssed based on the model s conformance to the real world problem domain. If the model accurately reflects the real world (to a level of detail that is appropriate to the stage of development at which the model is reviewed) then it is semantically correct. To determine whether the model does, in fact, reflect real world requirements, it should be presented to problem domain experts who will examine the class definitions and hierarchy for omissions and ambiguity. Class relationships (instance connections) are evaluated to determine whether they accurately reflect real-world object connections. (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 4

Class Model Consistency Revisit the CRC model and the object-relationship model. Inspect the description of each CRC index card to determine if a delegated responsibility is part of the collaborator s d efinition. Invert the connection to ensure that each collaborator that is asked for service is receiving requests from a reasonable source. Using the inverted connections examined in the preceding step, determine whether other classes might be required or whether responsibilities are properly grouped among the classes. Determine whether widely requested responsibilities might be combined into a single responsibility. (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 5

OO Testing Strategies Unit testing the concept of the unit changes the sm allest testable unit is the encapsulated class a single operation can no longer be tested in isolation (the conventional view of unit testing) but rather, as part of a class Integration Testing Thread-based testing integrates the set of classes required to respond to one input or event for the system Use-based testing begins the construction of the system by testing those classes (called independent classes) that use very few (if any) of server classes. After the independent classes are tested, the next layer of classes, called dependent classes Cluster testing [McG94] defines a cluster of collaborating classes (determined by examining the CRC and object-relationship model) is exercised by designing test cases that attempt to uncover errors in the collaborations. (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 6

OO Testing Strategies Valid ation Testing d etails of class connections d isappear draw upon use cases (Chapters 5 and 6) that are part of the requirements model Conventional black-box testing methods (Chapter 18) can be used to drive validation tests (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 7

OOT Methods Berard [Ber93] proposes the following approach: 1. Each test case should be uniquely identified and should be explicitly associated with the class to be tested, 2. The purpose of the test should be stated, 3. A list of testing steps should be developed for each test and should contain [BER94]: a. a list of specified states for the object that is to be tested b. a list of messages and operations that will be exercised as a consequence of the test c. a list of exceptions that may occur as the object is tested d. a list of external conditions (i.e., changes in the environment external to the software that must exist in order to properly conduct the test) e. supplementary information that will aid in understanding or implementing the test. (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 8

Testing Methods Fault-based testing The tester looks for plausible faults (i.e., aspects of the implementation of the system that may result in defects). To determine whether these faults exist, test cases are designed to exercise the design or code. Class Testing and the Class Hierarchy Inheritance does not obviate the need for thorough testing of all derived classes. In fact, it can actually complicate the testing process. Scenario-Based Test Design Scenario-based testing concentrates on what the user does, not what the product does. This means capturing the tasks (via usecases) that the user has to perform, then applying them and their variants as tests. (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 9

OOT Methods: Random Testing Random testing identify operations applicable to a class define constraints on their use identify a minimum test sequence an operation sequence that defines the minimum life history of the class (object) generate a variety of random (but valid) test sequences exercise other (more complex) class instance life histories (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 10

OOT Methods: Partition Testing Partition Testing reduces the number of test cases required to test a class in much the same way as equivalence partitioning for conventional software state-based partitioning categorize and test operations based on their ability to change the state of a class attribute-based partitioning categorize and test operations based on the attributes that they use category-based partitioning categorize and test operations based on the generic function each performs (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 11

OOT Methods: Inter-Class Testing Inter-class testing For each client class, use the list of class operators to generate a series of random test sequences. The operators will send messages to other server classes. For each message that is generated, determine the collaborator class and the corresponding operator in the server object. For each operator in the server object (that has been invoked by messages sent from the client object), determine the messages that it transmits. For each of the messages, determine the next level of operators that are invoked and incorporate these into the test sequence (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 12

OOT Methods: Behavior Testing The tests to be designed should achieve all state coverage [KIR94]. That is, the operation sequences should cause the Account class to make transition through all allowable states open empty acct dead acct setup Accnt balance credit accntinfo close set up acct working acct deposit (initial) nonworking acct withdrawal (final) deposit withdraw Figure 14.3 St at e diagram f or Account class (adapt ed f rom [ KIR94] ) (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman. 13