Unit Testing in the OO Context(Chapter 19-Roger P)

Slides:



Advertisements
Similar presentations
Object Oriented Analysis And Design-IT0207 iiI Semester
Advertisements

Testing Relational Database
Chapter 10 Software Testing
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Chapter 11 Component-Level Design
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
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.
Introduction To System Analysis and Design
Object-oriented Testing SIM3302. Objectives To cover the strategies and tools associated with object oriented testing  Analysis and Design Testing 
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
1 Web Testing CIS 376 Bruce R. Maxim UM-Dearborn.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
Introduction To System Analysis and design
Chapter 10 Architectural Design
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
1 Object-Oriented Testing CIS 375 Bruce R. Maxim UM-Dearborn.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 13b: Software Testing Strategies Software Engineering: A Practitioner’s Approach, 6/e Chapter.
These slides are designed to accompany Web Engineering: A Practitioner’s Approach (The McGraw-Hill Companies, Inc.) by Roger Pressman and David Lowe, copyright.
Objectives  Testing Concepts for WebApps  Testing Process  Content Testing  User Interface Testing  Component-level testing  Navigation Testing.
Web Engineering Web engineering is the process used to create high quality WebApps. Web engineering is not a perfect clone of software engineering. But.
Lecture 11 Testing and Debugging SFDV Principles of Information Systems.
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
1 Software Engineering Muhammad Fahad Khan Software Engineering Muhammad Fahad Khan University Of Engineering.
1 Chapter 7 Software Testing Strategies. 2 Software Testing Testing is the process of exercising a program with the specific intent of finding errors.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
Systems Analysis and Design in a Changing World, 3rd Edition
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Testing Techniques Software Testing Module ( ) Dr. Samer Hanna.
1 Chapter 18 Analysis Modeling for WebApps Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Chapter : 19 Testing Object-Oriented Applications.
Chapter 1: Fundamental of Testing Systems Testing & Evaluation (MNN1063)
LECTURE 19 23/11/15 Software Quality and Testing.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Chapter 8 Testing. Principles of Object-Oriented Testing Å Object-oriented systems are built out of two or more interrelated objects Å Determining the.
CIS 4910 Information Systems Development Project Project Documentation.
Chapter 24 객체지향 응용프로그램 테스팅 Testing Object-Oriented Applications 임현승 강원대학교 Revised from the slides by Roger S. Pressman and Bruce R. Maxim for the book.
1 Lecture 15: Chapter 19 Testing Object-Oriented Applications Slide Set to accompany Software Engineering: A Practitioner’s Approach, 7/e by Roger S. Pressman.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Software Engineering By Germaine Cheung Hong Kong Computer Institute Lecture 7.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
Software Engineering Lecture 10: System Engineering.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 14b: Software Testing Techniques Software Engineering: A Practitioner’s Approach, 6/e Chapter.
OBJECT-ORIENTED TESTING. TESTING OOA AND OOD MODELS Analysis and design models cannot be tested in the conventional sense. However, formal technical reviews.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
Software Engineering: A Practitioner’s Approach, 6/e Chapter 18 Analysis Modeling for WebApps copyright © 1996, 2001, 2005 R.S. Pressman & Associates,
Chapter 22 Software Testing Strategies برنامج استراتيجيات الاختبار
Software Engineering: A Practitioner’s Approach, 6/e Chapter 18 Analysis Modeling for WebApps copyright © 1996, 2001, 2005 R.S. Pressman & Associates,
Quality Management Perfectqaservices.
Software Engineering: A Practitioner’s Approach, 6/e Chapter 13 Software Testing Strategies copyright © 1996, 2001, 2005 R.S. Pressman & Associates,
PPT By:Bruce R. Maxim UM-Dearborn
Chapter 13 & 14 Software Testing Strategies and Techniques
Object-Oriented Analysis
Chapter 24 Testing Object-Oriented Applications
Object-Oriented Design
Chapter 17 Software Testing Strategies
Chapter 19 Testing Object-Oriented Applications
Chapter 10 – Software Testing
Chapter 17 Software Testing Strategies
Chapter 17 Software Testing Strategies
Chapter 19 Testing Object-Oriented Applications
Chapter 17 Software Testing Strategies.
Chapter 22 Software Testing Strategies
Chapter 17 Software Testing Strategies
TYPES OF TESTING.
Chapter 17 Software Testing Strategies
Presentation transcript:

Unit Testing in the OO Context(Chapter 19-Roger P) It involves testing for each class and each instance of a class (object) packages, attributes (i.e. data) and the operations (also known as methods or services) that manipulate these data. Rather than testing an individual module, the smallest testable unit is the encapsulated class or object. This is so because a class can contain a number of different operations and a particular operation may exist as part of a number of different classes. Consider a class hierarchy in which an operation X is defined for the superclass and is inherited by a number of subclasses. Each subclass uses operation X, but it is applied within the context of the private attributes and operations that have been defined for the subclass. Because the context in which operation X is used varies in subtle ways, it is necessary to test operation X in the context of each of the subclasses. Class testing for OO software is the equivalent of unit testing for conventional ware. Unlike unit testing class testing for OO software is driven by the operations encapsulated by the class and the state behavior of the class.

Integration testing There are two different strategies for integration testing of OO system The first i.e. thread-based testing, integrates the set of classes required to respond to one input or event for the system. Each thread is integrated and tested individually. Regression testing is applied to ensure that no side effect occur. The second integration approach i.e. the 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, that use the independent classes are tested. This sequence of testing layers of dependent classes continue until the entire system is constructed. Cluster testing is one step in the integration testing. Here a cluster of collaborating classes (det ermined by examine the CRC and object-relationship model) is exercised by designing test cases that attempt to uncover errors in the collaborations.

Validation Testing in an OO Context The validation of OO software focuses on user-visible actions and user-recognisable output from the system. To assist in the derivation of validation testing, the tester should work upon the use-cases that are part of the analysis model. The use-case provides a scenario that has a high likelihood of uncovered errors in the user interaction requirements. Conventional black-box testing methods can be used to drive validation tests. In addition, test cases may be derived from the object-behavior model and from event flow diagram created as part of OOA.

Test Case Design For OO Software an overall approach to OO test case design has been defined by Berard: Each test case should be uniquely identified and explicitly associated with the class to be tested. The purpose of the test should be stated. A list of testing steps should be developed for each test and should contain: A list of specified states for the object that is to be tested. A list of messages and operations that will be executed as a consequence of the test. A list of exceptions that may occur as the object is being tested. A list of external conditions (i.e., the changes in the environment external to the software that must exist in order to properly conduct the test.) Supplementary information that will aid in understanding or implementing the test. --Unlike conventional test case design, which is driven by an input-process-output view of software or the algorithmic detail of individual modules --object-oriented testing focuses on designing appropriate sequences of operations to exercise the states of a class.

Fault Based Testing The object of fault-based testing within an OO system is to design tests that have a high likelihood of uncovering plausible (i.e. hidden) faults.  Testing a SQRT operation that returns errors for negative numbers. Try the boundaries: a negative number close to zero and zero itself. “Zero itself” checks whether the programmer made a mistake like If (x>0) calculate_the_square_root(): Instead of the correct If (x>=0) calculate_the_square_root():  Consider another example: If (a && !b || c)  Possible errors could be && should be || ! was left out Need of parenthesis around !b || c  For such plausible faults, we need to design test cases that will force the incorrect expression to fail  

Website Testing WebApp testing is a collection of related activities with a single goal: to uncover errors in WebApp content,function,usability,navigability,performance,capacity and security Web engg and other project stakeholders participate in the webApp testing The webApp testing process begins by focusing on user-visible aspects of the WebApp and proceeds to tests that exercise technology and infrastructure

Testing for WebApps The objectives of testing within a web engg context, one should consider the dimension of quality Dimensions of quality:- quality is incorporated into a web applicn as a consequence of good design Its evaluated by applying a series of technical reviews that assist various elements of design model & by applying a testing process Dimensions of Quality:-Both reviews and testing examine one or more quality dimensions:- Content is evaluated at both a syntactic and semantic level. At syntactic, spelling, punctuation and grammar are assessed for text based docs. At semantic,correctness,consistency and lack of ambiguity are assessed Function is tested to uncover errors indicate lack of conformance to customer requirements. Its assessed for correctness,instability and general conformance to appropriate implementation std Structure is assessed to ensure that it properly delivers WebApp content and function that is extensible, new functionality may be added Usability is tested to ensure that each category of user is supported by the interface and can learn and apply all reqd.navigation syntax and semantics Navigability is tested to ensure that all navigation syntax and semantics are exercised to uncover any navigation errors(ex. dead links, improper links, erroneous links)

Testing for WebApps Performance:- tested under variety of operating conditions,configurations and loading to ensure that the system is responsive to user interaction Compatibility:-is tested by executing WebApp in a variety of diff host config.on both the client and server sides Interoperability:- it is tested to ensure that the WebApp properly interfaces with other applications and/or databases Security:- it is tested by potential vulnerabilities and attempting to exploit each

Errors within WebApp environment Many types of Webapp tests uncover problems that are first evidenced on client side Because webapp is implemented on client side on diff config,diff platforms and in diff environments Some errors may be there in the incorrect design or HTML coding Errors are difficult to trace in 3 layer architecture:- client,server and n/w layer

Self Study Pg 443-448 Pankaj Jalote Book Planning s/w Testing Self Study Pg 443-448 Pankaj Jalote Book