SlideShare ist ein Scribd-Unternehmen logo
1 von 26
T.Y. B.Sc. (Comp. Sci.) Sem I
Object Oriented Software Engineering
(OOSE)
CS-336
Faculty
Dr. Amit D. Kasliwal
Asst. Professor
Chapter 9
Object Oriented Testing
Objective
 Object Oriented Testing Strategies
 Test Case Design for Object Oriented Software
 Inter Class Test Case Design
Object Oriented Testing
 Testing is the process of exercising a program with the
specific intent of finding errors prior to delivery to the end
user.
 The objective of testing is to find the greatest possible
number of errors with a manageable amount of effort
applied over a realistic time span.
 Although this fundamental objective remains unchanged
for object-oriented software, the nature of OO programs
changes both testing strategy and testing tactics.
Testing Shows
Object Oriented Testing
 All software testing strategies provide a template for
testing and all have the following generic characteristics:
 Conduct effective formal technique reviews, by doing this,
many errors will be eliminated before testing commences.
 Testing begins at the component level and works “outward”
towards the integration of the entire computer-based system.
 Different testing techniques are appropriate at different points
in time.
 Testing is conducted by the developer of the software and
an independent test group.
Object Oriented Testing
Who Tests the Software?
Verification and Validation
 Verification refers to the set of activities that ensure that
product correctly implements a specific function.
 Validation refers to the set of activities that ensure that the
product has been built is traceable to customer
requirements.
 Verification: Are we building the product right?
 Validation: Are we building the right product?
 The definition of Verification and Validation encompasses
many of the activities that are encompassed by software
quality assurance (SQA).
Test Case
 A test case is a document, which has a set of test data,
preconditions, expected results and post conditions, developed
for a particular test scenario in order to verify compliance
against a specific requirement.
 Test Case acts as the starting point for the test execution, and
after applying a set of input values, the application has
 a definitive outcome and leaves the system at some end point
or also known as execution post condition.
 Typical Test Case Parameters are Test Case ID, Test Scenario,
Test Case Description, Test Steps, Prerequisite, Test Data,
Expected Result, Test Parameters, Actual Result, Environment
Information, Comments.
Test Case
Scenario Test Step Expected Result Actual Outcome
Verify that the input
field that can accept
maximum of 10
characters
Login to application and
key in 10 characters
Application should be
able to accept all 10
characters.
Application accepts all
10 characters.
Verify that the input
field that can accept
maximum of 11
characters
Login to application and
key in 11 characters
Application should NOT
accept all 11 characters.
Application accepts all
10 characters.
Organizing for Software Testing
 There are often a number of misconceptions that can be
erroneously inferred for testing:
 That the developer of project shouldn’t test.
 That the software project should be tossed over the wall
to strangers who will test it mercilessly
 That testers get involved only when testing steps are
about to begin.
 These aforementioned statements are incorrect.
Testing Strategies
Testing Strategies
Unit Testing : It is a level of software testing where individual
units/ components of a software are tested.
 A unit is the smallest testable part of any software. Usually
has one or a few inputs and usually a single output.
 The purpose is to validate that each unit of the software
performs as designed.
 An encapsulated class is the focus of unit testing.
 However, operations within the class and the state behavior of
the class are the smallest testable units.
 Class testing for object oriented software is analogous to
module testing for conventional software. It is not advisable
to test operations in isolation.
Black Box Testing is a software testing method in which the
internal structure/ design/ implementation of the item being
tested is not known to the tester.
 This testing can be initiated on the basis of requirement
specifications document.
White Box Testing is a software testing method in which the
internal structure/ design/ implementation of the item being
tested is known to the tester.
 This type of testing of software is started after detail design
document.
Testing Strategies
Testing Strategies
Integration Testing : It is a level of software testing where
individual units are combined and tested as a group.
 It is to expose faults in the interaction between integrated
units.
 Test drivers and test stubs are used to assist in Integration
Testing.
 An important strategy for integration testing of object
oriented software is thread-based testing.
Integration Testing
 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.
 Use-Based testing begins the construction of the system by
testing those classes (called independent classes) that use
very few server (if any) classes. Dependent classes, which
use independent classes, are tested.
 This sequence of testing layers of dependent classes
continues until the entire system is constructed.
 Cluster testing is one-step in the integration testing process.
 A cluster of collaborating classes is exercised by designing
test cases that attempt to uncover errors in the
collaborations.
Testing Strategies
Validation Testing : It is described as the last chance to catch
program errors before delivery to the customer.
 If the users are not happy with what they see, the
developers often do not get paid.
 The key point to emphasize is traceability to requirements.
In addition, the importance of alpha and beta testing (in
product environments) should be stressed.
 Validation Test Criteria: Focus is on software requirements.
A test plan outlines the classes of tests to be conducted, and
a test procedure defines specific test cases.
Testing Strategies
Alpha/Beta testing: This strategy focuses on customer usage.
 Alpha tests are conducted in a controlled environment and
conducted at the developer’s site by end-users.
 The s/w is used in natural setting with the developer with users,
recording errors and usage problems.
 The beta-test is conducted at the end-users sites where developer
is generally not present.
 Beta test is a live application of the software in an environment
that cannot be controlled by the developer.
 The end-user records errors and all usage problems encountered
during the test and the list is reported to the developer.
 And then modifications is done to prepare for release of product
to the entire customer base.
Testing Strategies
System Testing : The focus is on system integration.
 System Testing is a series of different tests whose primary
purpose it to fully exercise the computer-based system.
 Following are the types of system tests:
 Recovery Testing : Forces the software to fail in a variety of ways
and verifies that recovery is properly performed for data
recovery.
 Security Testing : It verifies that protection mechanisms built
into a system will, in fact, protect it from improper penetration.
 The system’s security must, of course, be tested for
invulnerability from frontal attack-but must also be tested for
invulnerability from flank or rear attack.
Testing Strategies
Stress Testing : It executes a system in a manner that demands
resources in abnormal quantity, frequency, or volume. For
example:
 Special tests may be designed to generate 10 interrupts per
second, when one or two is the average rate.
 Test cases that require maximum memory or other resources are
executed,
 Test cases causing memory management problems are designed.
 Test cases that may cause excessive hunting for disk-resident
data are created.
 A variation of stress testing is a technique called sensitivity
testing. They attempt to uncover data combinations within valid
input classes that may cause instability or improper processing.
Testing Strategies
Performance Testing : It tests the run-time performance of
software within the context of an integrated system.
 Performance tests are coupled with stress testing and
usually require both hardware & software instrumentation.
Documentation Testing involves testing of the documented
artifacts that are usually developed before or during the
testing of Software.
 Documentation for Software testing helps in estimating the
testing effort required, test coverage, requirement
tracking/tracing, etc.
Testing Strategies
Test Case Design for OO Software
 An approach to OO test case design has been defined by :
1. Each test case should be uniquely identified and explicitly
associated with the class to be tested.
2. The purpose of the test should be stated.
 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 exercised as a
consequence of the test.
 A list of exceptions that may occur as the object is tested.
 A list of external that must exist in order to properly conduct
the test.
 Supplementary information that will aid in understanding or
implementing the test.
Interclass Test Case Design
 Test case design becomes more complicated as integration
of the OO system begins. It is at this stage that testing of
collaborations between classes must begin.
 Inter class testing is the testing of a set of classes composing
a system or subsystem, usually performed during
integration.
 Typically, such classes are not stand-alone entities, but
mutually cooperate in several ways.
 These relationships among classes are a fundamental
characteristic of object-oriented systems and define the
nature of the interactions among objects at runtime.
The figure shows banking process including the classes and collaborations
to illustrate interclass test case .
Interclass Test Case Design
 Following are the steps to generate multiple inner class random
test cases:
 For each client class, use the list of class operations to generate a
series of random test sequences. The operations will send
messages to other server classes.
 For each message that is generated, determine the collaborator
class and the corresponding operation in the server object.
 For each operation 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 operations
that are invoked and incorporate these into the test sequence.
To illustrate above, consider a sequence of operations for the bank class
relative to an ATM class as shown in above figure:
Object Oriented Testing

Weitere ähnliche Inhalte

Was ist angesagt?

Testing object oriented software.pptx
Testing object oriented software.pptxTesting object oriented software.pptx
Testing object oriented software.pptxDRPOONAMDRPOONAM1
 
What is Integration Testing? | Edureka
What is Integration Testing? | EdurekaWhat is Integration Testing? | Edureka
What is Integration Testing? | EdurekaEdureka!
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation TestingArchana Krushnan
 
Software testing life cycle
Software testing life cycleSoftware testing life cycle
Software testing life cycleGaruda Trainings
 
UNIT TESTING PPT
UNIT TESTING PPTUNIT TESTING PPT
UNIT TESTING PPTsuhasreddy1
 
Basics of Object Oriented Programming in Python
Basics of Object Oriented Programming in PythonBasics of Object Oriented Programming in Python
Basics of Object Oriented Programming in PythonSujith Kumar
 
Java Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and StreamsJava Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and StreamsAnton Keks
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming languageMd.Al-imran Roton
 
Exception Handling in JAVA
Exception Handling in JAVAException Handling in JAVA
Exception Handling in JAVASURIT DATTA
 
Types of software testing
Types of software testingTypes of software testing
Types of software testingPrachi Sasankar
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivityTanmoy Barman
 

Was ist angesagt? (20)

Unit testing
Unit testing Unit testing
Unit testing
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Black box & white-box testing technique
Black box & white-box testing techniqueBlack box & white-box testing technique
Black box & white-box testing technique
 
Testing web application
Testing web applicationTesting web application
Testing web application
 
Testing object oriented software.pptx
Testing object oriented software.pptxTesting object oriented software.pptx
Testing object oriented software.pptx
 
Basic of Java
Basic of JavaBasic of Java
Basic of Java
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Integration test
Integration testIntegration test
Integration test
 
What is Integration Testing? | Edureka
What is Integration Testing? | EdurekaWhat is Integration Testing? | Edureka
What is Integration Testing? | Edureka
 
Black box software testing
Black box software testingBlack box software testing
Black box software testing
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
Software testing life cycle
Software testing life cycleSoftware testing life cycle
Software testing life cycle
 
UNIT TESTING PPT
UNIT TESTING PPTUNIT TESTING PPT
UNIT TESTING PPT
 
Basics of Object Oriented Programming in Python
Basics of Object Oriented Programming in PythonBasics of Object Oriented Programming in Python
Basics of Object Oriented Programming in Python
 
Java Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and StreamsJava Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and Streams
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
 
Exception Handling in JAVA
Exception Handling in JAVAException Handling in JAVA
Exception Handling in JAVA
 
CORBA
CORBACORBA
CORBA
 
Types of software testing
Types of software testingTypes of software testing
Types of software testing
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 

Ähnlich wie Object Oriented Testing

Ähnlich wie Object Oriented Testing (20)

Software testing
Software testingSoftware testing
Software testing
 
unit 4.pptx very needful and important p
unit 4.pptx very needful and important punit 4.pptx very needful and important p
unit 4.pptx very needful and important p
 
softwaretestingppt-FINAL-PPT-1
softwaretestingppt-FINAL-PPT-1softwaretestingppt-FINAL-PPT-1
softwaretestingppt-FINAL-PPT-1
 
Testing strategies
Testing strategiesTesting strategies
Testing strategies
 
Software testing
Software testingSoftware testing
Software testing
 
Interview questions for manual testing technology.
Interview questions for manual testing technology.Interview questions for manual testing technology.
Interview questions for manual testing technology.
 
Testing
Testing Testing
Testing
 
Software test proposal
Software test proposalSoftware test proposal
Software test proposal
 
Software testing2
Software testing2Software testing2
Software testing2
 
Software testing
Software testingSoftware testing
Software testing
 
Software testing
Software testingSoftware testing
Software testing
 
Demo1ghjkl
Demo1ghjklDemo1ghjkl
Demo1ghjkl
 
Software testing
Software testingSoftware testing
Software testing
 
Software testing
Software testingSoftware testing
Software testing
 
software testing
software testingsoftware testing
software testing
 
Software testing
Software testingSoftware testing
Software testing
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Software testing
Software testingSoftware testing
Software testing
 
Software testing
Software testingSoftware testing
Software testing
 
Software testing
Software testingSoftware testing
Software testing
 

Mehr von AMITJain879

Architectural Modeling
Architectural ModelingArchitectural Modeling
Architectural ModelingAMITJain879
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented DesignAMITJain879
 
Object Oriented Analysis
Object Oriented AnalysisObject Oriented Analysis
Object Oriented AnalysisAMITJain879
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral ModelingAMITJain879
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural ModelingAMITJain879
 
Basic Structural Modeling
Basic Structural ModelingBasic Structural Modeling
Basic Structural ModelingAMITJain879
 
Introduction to Unified Modeling Language
Introduction to Unified Modeling LanguageIntroduction to Unified Modeling Language
Introduction to Unified Modeling LanguageAMITJain879
 
What is Object Orientation?
What is Object Orientation?What is Object Orientation?
What is Object Orientation?AMITJain879
 

Mehr von AMITJain879 (8)

Architectural Modeling
Architectural ModelingArchitectural Modeling
Architectural Modeling
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Analysis
Object Oriented AnalysisObject Oriented Analysis
Object Oriented Analysis
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
 
Basic Structural Modeling
Basic Structural ModelingBasic Structural Modeling
Basic Structural Modeling
 
Introduction to Unified Modeling Language
Introduction to Unified Modeling LanguageIntroduction to Unified Modeling Language
Introduction to Unified Modeling Language
 
What is Object Orientation?
What is Object Orientation?What is Object Orientation?
What is Object Orientation?
 

Kürzlich hochgeladen

WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 

Kürzlich hochgeladen (20)

WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 

Object Oriented Testing

  • 1. T.Y. B.Sc. (Comp. Sci.) Sem I Object Oriented Software Engineering (OOSE) CS-336 Faculty Dr. Amit D. Kasliwal Asst. Professor
  • 2. Chapter 9 Object Oriented Testing Objective  Object Oriented Testing Strategies  Test Case Design for Object Oriented Software  Inter Class Test Case Design
  • 3. Object Oriented Testing  Testing is the process of exercising a program with the specific intent of finding errors prior to delivery to the end user.  The objective of testing is to find the greatest possible number of errors with a manageable amount of effort applied over a realistic time span.  Although this fundamental objective remains unchanged for object-oriented software, the nature of OO programs changes both testing strategy and testing tactics.
  • 5.  All software testing strategies provide a template for testing and all have the following generic characteristics:  Conduct effective formal technique reviews, by doing this, many errors will be eliminated before testing commences.  Testing begins at the component level and works “outward” towards the integration of the entire computer-based system.  Different testing techniques are appropriate at different points in time.  Testing is conducted by the developer of the software and an independent test group. Object Oriented Testing
  • 6. Who Tests the Software?
  • 7. Verification and Validation  Verification refers to the set of activities that ensure that product correctly implements a specific function.  Validation refers to the set of activities that ensure that the product has been built is traceable to customer requirements.  Verification: Are we building the product right?  Validation: Are we building the right product?  The definition of Verification and Validation encompasses many of the activities that are encompassed by software quality assurance (SQA).
  • 8. Test Case  A test case is a document, which has a set of test data, preconditions, expected results and post conditions, developed for a particular test scenario in order to verify compliance against a specific requirement.  Test Case acts as the starting point for the test execution, and after applying a set of input values, the application has  a definitive outcome and leaves the system at some end point or also known as execution post condition.  Typical Test Case Parameters are Test Case ID, Test Scenario, Test Case Description, Test Steps, Prerequisite, Test Data, Expected Result, Test Parameters, Actual Result, Environment Information, Comments.
  • 9. Test Case Scenario Test Step Expected Result Actual Outcome Verify that the input field that can accept maximum of 10 characters Login to application and key in 10 characters Application should be able to accept all 10 characters. Application accepts all 10 characters. Verify that the input field that can accept maximum of 11 characters Login to application and key in 11 characters Application should NOT accept all 11 characters. Application accepts all 10 characters.
  • 10. Organizing for Software Testing  There are often a number of misconceptions that can be erroneously inferred for testing:  That the developer of project shouldn’t test.  That the software project should be tossed over the wall to strangers who will test it mercilessly  That testers get involved only when testing steps are about to begin.  These aforementioned statements are incorrect.
  • 12. Testing Strategies Unit Testing : It is a level of software testing where individual units/ components of a software are tested.  A unit is the smallest testable part of any software. Usually has one or a few inputs and usually a single output.  The purpose is to validate that each unit of the software performs as designed.  An encapsulated class is the focus of unit testing.  However, operations within the class and the state behavior of the class are the smallest testable units.  Class testing for object oriented software is analogous to module testing for conventional software. It is not advisable to test operations in isolation.
  • 13. Black Box Testing is a software testing method in which the internal structure/ design/ implementation of the item being tested is not known to the tester.  This testing can be initiated on the basis of requirement specifications document. White Box Testing is a software testing method in which the internal structure/ design/ implementation of the item being tested is known to the tester.  This type of testing of software is started after detail design document. Testing Strategies
  • 14. Testing Strategies Integration Testing : It is a level of software testing where individual units are combined and tested as a group.  It is to expose faults in the interaction between integrated units.  Test drivers and test stubs are used to assist in Integration Testing.  An important strategy for integration testing of object oriented software is thread-based testing.
  • 15. Integration Testing  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.  Use-Based testing begins the construction of the system by testing those classes (called independent classes) that use very few server (if any) classes. Dependent classes, which use independent classes, are tested.  This sequence of testing layers of dependent classes continues until the entire system is constructed.  Cluster testing is one-step in the integration testing process.  A cluster of collaborating classes is exercised by designing test cases that attempt to uncover errors in the collaborations. Testing Strategies
  • 16. Validation Testing : It is described as the last chance to catch program errors before delivery to the customer.  If the users are not happy with what they see, the developers often do not get paid.  The key point to emphasize is traceability to requirements. In addition, the importance of alpha and beta testing (in product environments) should be stressed.  Validation Test Criteria: Focus is on software requirements. A test plan outlines the classes of tests to be conducted, and a test procedure defines specific test cases. Testing Strategies
  • 17. Alpha/Beta testing: This strategy focuses on customer usage.  Alpha tests are conducted in a controlled environment and conducted at the developer’s site by end-users.  The s/w is used in natural setting with the developer with users, recording errors and usage problems.  The beta-test is conducted at the end-users sites where developer is generally not present.  Beta test is a live application of the software in an environment that cannot be controlled by the developer.  The end-user records errors and all usage problems encountered during the test and the list is reported to the developer.  And then modifications is done to prepare for release of product to the entire customer base. Testing Strategies
  • 18. System Testing : The focus is on system integration.  System Testing is a series of different tests whose primary purpose it to fully exercise the computer-based system.  Following are the types of system tests:  Recovery Testing : Forces the software to fail in a variety of ways and verifies that recovery is properly performed for data recovery.  Security Testing : It verifies that protection mechanisms built into a system will, in fact, protect it from improper penetration.  The system’s security must, of course, be tested for invulnerability from frontal attack-but must also be tested for invulnerability from flank or rear attack. Testing Strategies
  • 19. Stress Testing : It executes a system in a manner that demands resources in abnormal quantity, frequency, or volume. For example:  Special tests may be designed to generate 10 interrupts per second, when one or two is the average rate.  Test cases that require maximum memory or other resources are executed,  Test cases causing memory management problems are designed.  Test cases that may cause excessive hunting for disk-resident data are created.  A variation of stress testing is a technique called sensitivity testing. They attempt to uncover data combinations within valid input classes that may cause instability or improper processing. Testing Strategies
  • 20. Performance Testing : It tests the run-time performance of software within the context of an integrated system.  Performance tests are coupled with stress testing and usually require both hardware & software instrumentation. Documentation Testing involves testing of the documented artifacts that are usually developed before or during the testing of Software.  Documentation for Software testing helps in estimating the testing effort required, test coverage, requirement tracking/tracing, etc. Testing Strategies
  • 21. Test Case Design for OO Software  An approach to OO test case design has been defined by : 1. Each test case should be uniquely identified and explicitly associated with the class to be tested. 2. The purpose of the test should be stated.  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 exercised as a consequence of the test.  A list of exceptions that may occur as the object is tested.  A list of external that must exist in order to properly conduct the test.  Supplementary information that will aid in understanding or implementing the test.
  • 22. Interclass Test Case Design  Test case design becomes more complicated as integration of the OO system begins. It is at this stage that testing of collaborations between classes must begin.  Inter class testing is the testing of a set of classes composing a system or subsystem, usually performed during integration.  Typically, such classes are not stand-alone entities, but mutually cooperate in several ways.  These relationships among classes are a fundamental characteristic of object-oriented systems and define the nature of the interactions among objects at runtime.
  • 23. The figure shows banking process including the classes and collaborations to illustrate interclass test case .
  • 24. Interclass Test Case Design  Following are the steps to generate multiple inner class random test cases:  For each client class, use the list of class operations to generate a series of random test sequences. The operations will send messages to other server classes.  For each message that is generated, determine the collaborator class and the corresponding operation in the server object.  For each operation 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 operations that are invoked and incorporate these into the test sequence.
  • 25. To illustrate above, consider a sequence of operations for the bank class relative to an ATM class as shown in above figure: