SlideShare a Scribd company logo
1 of 36
MEETING 8
OBJECT-ORIENTED TESTING
SOFTWARE TESTING
By : Ajeng Savitri Puspaningrum, M.Kom
OBJECTIVE
• Learning Object-Oriented
Testing
Introduction
4
INTRODUCTION
• When object-oriented software is considered,
the concept of the unit changes.
• Encapsulation drives the definition of classes
and objects.
• An encapsulated class is usually the focus of
unit testing
5
THE OBJECT-ORIENTED TESTING
• The component being tested is class-
object.
• Larger than testing a function so the
white-box testing approach needs to be
expanded.
• Unclear 'top' of a system for top-down
integration and testing
6
OBJECT-ORIENTED TESTING VS OTHER
• The most notable differences of object-oriented testing concern the
phases of module and system testing
• Due to modularization, there are more intraprocedural interdependencies.
• Sharing of class members (fields) might couple methods of classes that are
not meant to or at least do not appear to share data.
• Programming for reusability and a more generalized functionality of classes
introduces more possibilities to test them.
• There is no linear growth between the size of the class and its complexity.
• Code instrumentation is more complex.
• Modularization, inheritance, and polymorphism have to be given special care.
7
HOW TO TEST THE OO-SYSTEM
• Three things to consider when testing an OO
system
• The definition of testing should be expanded to
include error finding techniques applied to the
OOA(Object Oriented Analysis) and OOD(Object
Oriented Design) models.
• The unit testing strategy will become less meaningful
and the integration strategy will have to change
significantly
• Test case design must account for the unique
characteristics of OO software
8
THE ACTIVITIES
• Reviewing the OOA and OOD models
• Class Test after writing source program
• Integration Test in subsystems
• Integration Test of subsystems that have been
added to the system
• Validation Test based on OOA use-cases
OOA and OOD cannot be tested but can be
reviewed for correctness and consistency
9
CORRECTNESS
• Syntactic
• Defined by ensuring that modeling
requirements and symbolism conventions are
used
• Semantics
• Based on the accuracy of the model with
real-world problem sources
10
CONSISTENCY
1. Review the CRC (class-responsibility-
collaborator) model and the
relationship diagram between
objects.
2. Review system design (check object
behavior model to check system
behavior mapping to subsystems,
review concurrency and task
allocation, use use-case scenarios to
check user interface design)
11
3. Object model test against object
relation network to ensure that all
object designs contains the attributes
and operations required to carry out
the collaboration defined for each CRC
card.
4. Check the detailed specification of the
algorithm used to carry out
conventional operations using
inspection techniques
CONSISTENCY (CONT…)
Object-Oriented
Testing
Strategies
13
UNIT TESTING IN OBJECT-ORIENTED
• Concept of unit change
• Smallest unit testable is encapsulated class
or object
• One operation can no longer be tested in
isolation (conventional view of unit testing)
but rather as part of a class
• Does not test operations in isolation with
other operations
• Executed by class operations and fixed
behavior, not algorithmic details and data
flow across module interfaces
14
UNIT TESTING IN OBJECT-ORIENTED( C O NT … )
• Each of these methods will train an
operation encapsulated by the class
• The test sequence is designed to ensure
that the relevant operations are tested
• The fixed position of a class (its attribute
value) is tested to determine if there are
errors
15
TESTING ACTIVITIES
• Test all operations related to
objects
• Manage and interrogate all object
attributes
• Train objects in all possibilities
16
TESTING DESIGN
• Fault-based testing
• Random testing
• Partition testing
17
INTEGRATION TEST IN OBJECT-ORIENTED
• Focused on classroom groups that
collaborate or communicate in some
way.
• The integration of operations one by
one into the class is often futile
• Fewer different levels of integration in
object-oriented systems
18
TESTING DESIGN
• Thread-based testing integrates the set of classes required to respond
to a single input or event for the system
• Use-based testing starts the system building by testing those classes
(called independent classes) that use very few (if any) server classes.
After independent classes are tested, the next layer of classes, called
dependent classes
• Cluster testing defines a group of collaborating classes (determined
by examining CRC and object-relationship models) carried out by
designing test cases that seek to uncover errors in collaboration.
19
VALIDATION TESTING IN OBJECT-ORIENTED
• Class connection details disappear
• Describe use cases that are part of the
requirements model
• Focuses on visible user actions and users can
recognize the output of the system
• Validation tests are based on use-case
scenarios, object behavior models, and
event flowcharts created in the OOA model
• Conventional black box testing can be used
to drive validation tests
Object-Oriented
Testing
Method
21
APPROACH
• Each test case must be uniquely
identified and must be explicitly
associated with the class to be tested,
• The purpose of the test should be stated,
• Write down the test steps for each
included test
22
TESTING STEPS
• A list of test steps should be developed for each test and should
contain:
• List of states specified for the object to be tested
• List of messages and operations to be performed as a consequence of testing
• List of exceptions that can occur when the object is tested
• List of external conditions (eg, environmental changes outside of the software
that must be present in order to properly perform the test)
• Additional information that will assist in understanding or carrying out the
test.
23
TESTING SURFACE STRUCTURE
AND DEEP STRUCTURE
• Testing a surface structure
• Is training a structure visible to the end
user, often involving observing and
interviewing users as they manipulate
system objects.
• Testing deep structure
• Is training internal program structures, such
as dependencies, behaviors, and
communication mechanisms that exist as
part of system and object design.
24
CLASS TESTING
• Class testing for object-oriented (OO)
software is the equivalent of unit testing
for conventional software.
• Driven by the operations encapsulated by
the class and the state behavior of the
class.
• Method :
• Random Testing
• Partition testing
• Fault-based testing
25
RANDOM TESTING
• Requires a large number of permutations and
combinations of data, and can be inefficient
• Identify the operations that apply to a class
• Define constraints on their use
• Identify the minimum test sequence
• Operations Sequence that define the minimum
life history of a class (object)
• Generate various random (but valid) test
sequences
• Other class example life history exercises (more
complex)
26
PARTITION TESTING
• Eliminates the number of test cases needed to test a
class
• State-based partitioning : tests are designed in such a way
that operations that cause state changes are tested
separately from those that do not.
• Attribute-based partitioning : for each class attribute,
operations are classified based on the user of the attribute,
which modifies the attribute and which does not use or
modify the attribute
• Category-based partitioning : operations are categorized
based on the function they perform, such as: initialization,
computing, querying, termination
27
FAULT-BASED TESTING
• Best for operations and class levels
• Using inheritance structures
• Testing examines the OOA model and
hypothesizes a set of understood crashes
that might occur in operation calls and
message connections, and builds appropriate
test cases
• Finds incorrect specifications and errors in
subsystem interactions
28
INTER-CLASS TESTING
• Test case design becomes more complicated as does integration from
the start of the OO system – testing collaboration between classes
• Various class test, such as:
• For each client class uses a class operator list to generate a sequence of
random tests that send messages to the same server class else
• For each message generated, specify the collaborator class and the
designated server object operator
• For each server operator class (requested by a message from the client
object) specify the message sent
• For each message, determine the next operator level requesting and
combining them into the trial order
29
TEST DESIGN
• Tests generated from behavioral models
• Use a state transition diagram (STD) as a model that
represents the dynamic behavior of a class.
• Test cases should cover all stages of STD
• Breadth first traversal of usable state models (test
one transition at a time and only make use of
previously tested transitions when testing new
transitions)
• Test cases can also be generated to ensure that all
behavior for the class has been tested properly
• Methods :
• Cluster Testing
• Use Case/Scenario-based Testing
30
CLUSTER TESTING
• Focuses on integrating and testing groups
of objects that work together
• Identifying groups by using knowledge of
the operation of objects and having
systems implemented by these groups.
31
CLUSTER TESTING APPROACH
• Use-case or scenario testing
• Testing is based on user interaction with the system
• Has the advantage that system testing features as experienced by users.
• Thread testing : tests the response of the system to events as the
thread processing through the system
• Object interaction testing : tests the sequence of object interactions
that stop when an object's operation does not call the service of
another object
32
USE CASE/SCENARIO-BASED TESTING
• Based on use-case and corresponding sequence
diagram
• Identify scenarios of use-cases and add to these with
interaction diagrams showing the objects included in
scenario
• A scenario is a path through a sequence diagram
• Concentrate on requirements (functional):
• Every use case
• Every expansion combination full extension (<<extend>>)
• Every expansion of the full usage combination (<<uses>>)
• Normal test like behavior
33
USE CASE/SCENARIO-BASED TESTING(CONT…)
• Many different scenarios can be linked by a
sequence diagram
• Use the user tasks described in the use-cases and
build test cases from these tasks and their variations
• Find errors that arise when users interact with OO
software
• Concentrate on what the function does, not what
the product does
• Can get a greater return on the effort and time spent
reviewing use-cases since they were created, than
on wasting time on test use-cases
34
OO TEST DESIGN ISSUES
• The white-box testing method can be applied to
program usability testing to implement class operations
but not to others
• The black-box testing method is very appropriate for
testing OO systems
• Object-oriented programming creates additional
requirements for testing, in the form of:
• Classes can contains operations derived from super classes
• Subclasses can contain operations that are redefined rather
than derived
• All classes generated from testing of previous base classes
require further testing
References
Lewis, W. E. (2009). Software Testing And Continuous Quality
Improvement ed. 3rd. Auerbach publications.
02
Majchrzak, T. A. (2012). Improving Software Testing: Technical And
Organizational Developments. Springer Science & Business Media.
03
Myers, G. J., Sandler, C., & Badgett, T. (2012). The Art Of Software
Testing. John Wiley & Sons.
04
Roger, S. P., & Bruce, R. M. (2019). Software Engineering: A
Practitioner’s Approach Ed.9th. McGraw-Hill Education.
01
THANK YOU
Insert the Subtitle of Your Presentation

More Related Content

What's hot

Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing StrategiesAlpana Bhaskar
 
What Is Functional Testing?
What Is Functional Testing?What Is Functional Testing?
What Is Functional Testing?QA InfoTech
 
Software testing.ppt
Software testing.pptSoftware testing.ppt
Software testing.pptKomal Garg
 
Software testing
Software testingSoftware testing
Software testingAshu Bansal
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testingHadi Fadlallah
 
Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)Venkatesh Prasad Ranganath
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4 Mohammad Faizan
 
Software Testing: History, Trends, Perspectives - a Brief Overview
Software Testing: History, Trends, Perspectives - a Brief OverviewSoftware Testing: History, Trends, Perspectives - a Brief Overview
Software Testing: History, Trends, Perspectives - a Brief OverviewSoftheme
 
scenario testing in software testing
 scenario testing in software testing scenario testing in software testing
scenario testing in software testingdurgaaarthi
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and typesConfiz
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategiesSHREEHARI WADAWADAGI
 
Test case design
Test case designTest case design
Test case design99pillar
 

What's hot (20)

Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
 
What Is Functional Testing?
What Is Functional Testing?What Is Functional Testing?
What Is Functional Testing?
 
Software testing.ppt
Software testing.pptSoftware testing.ppt
Software testing.ppt
 
Software testing
Software testingSoftware testing
Software testing
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
 
Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)Testing concepts [3] - Software Testing Techniques (CIS640)
Testing concepts [3] - Software Testing Techniques (CIS640)
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 
Software testing
Software testingSoftware testing
Software testing
 
Software Testing: History, Trends, Perspectives - a Brief Overview
Software Testing: History, Trends, Perspectives - a Brief OverviewSoftware Testing: History, Trends, Perspectives - a Brief Overview
Software Testing: History, Trends, Perspectives - a Brief Overview
 
scenario testing in software testing
 scenario testing in software testing scenario testing in software testing
scenario testing in software testing
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and types
 
Types of testing
Types of testingTypes of testing
Types of testing
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
System testing
System testingSystem testing
System testing
 
3.software testing
3.software testing3.software testing
3.software testing
 
SOFTWARE TESTING
SOFTWARE TESTINGSOFTWARE TESTING
SOFTWARE TESTING
 
System testing
System testingSystem testing
System testing
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
 
Introduction & Manual Testing
Introduction & Manual TestingIntroduction & Manual Testing
Introduction & Manual Testing
 
Test case design
Test case designTest case design
Test case design
 

Similar to Object Oriented Testing

Software Testing IN SOFTWARE SPM PPTpptx
Software Testing IN SOFTWARE SPM PPTpptxSoftware Testing IN SOFTWARE SPM PPTpptx
Software Testing IN SOFTWARE SPM PPTpptxPraveenAtishay
 
Software testing part
Software testing partSoftware testing part
Software testing partPreeti Mishra
 
Testing strategies -2
Testing strategies -2Testing strategies -2
Testing strategies -2Divya Tiwari
 
Integration system acceptance test
Integration system acceptance testIntegration system acceptance test
Integration system acceptance testSyed Usman Ahmed
 
types of testing with descriptions and examples
types of testing with descriptions and examplestypes of testing with descriptions and examples
types of testing with descriptions and examplesMani Deepak Choudhry
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality AssuranceSaqib Raza
 
&lt;p>Software Testing&lt;/p>
&lt;p>Software Testing&lt;/p>&lt;p>Software Testing&lt;/p>
&lt;p>Software Testing&lt;/p>Atul Mishra
 
An overview to Software Testing
An overview to Software TestingAn overview to Software Testing
An overview to Software TestingAtul Mishra
 
Automated testing of ASP .Net Core applications
Automated testing of ASP .Net Core applications Automated testing of ASP .Net Core applications
Automated testing of ASP .Net Core applications nispas
 
How to improve your unit tests?
How to improve your unit tests?How to improve your unit tests?
How to improve your unit tests?Péter Módos
 
Software Engineering Lec 10 -software testing--
Software Engineering Lec 10 -software testing--Software Engineering Lec 10 -software testing--
Software Engineering Lec 10 -software testing--Taymoor Nazmy
 
Software engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designMaitree Patel
 

Similar to Object Oriented Testing (20)

Software Testing IN SOFTWARE SPM PPTpptx
Software Testing IN SOFTWARE SPM PPTpptxSoftware Testing IN SOFTWARE SPM PPTpptx
Software Testing IN SOFTWARE SPM PPTpptx
 
Software testing part
Software testing partSoftware testing part
Software testing part
 
Software Testing
Software Testing Software Testing
Software Testing
 
Testing
TestingTesting
Testing
 
Unit testing
Unit testingUnit testing
Unit testing
 
Testing Technique
Testing TechniqueTesting Technique
Testing Technique
 
Testing strategies -2
Testing strategies -2Testing strategies -2
Testing strategies -2
 
Integration system acceptance test
Integration system acceptance testIntegration system acceptance test
Integration system acceptance test
 
types of testing with descriptions and examples
types of testing with descriptions and examplestypes of testing with descriptions and examples
types of testing with descriptions and examples
 
Unit Testing in Swift
Unit Testing in SwiftUnit Testing in Swift
Unit Testing in Swift
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
 
Testing fundamentals
Testing fundamentalsTesting fundamentals
Testing fundamentals
 
&lt;p>Software Testing&lt;/p>
&lt;p>Software Testing&lt;/p>&lt;p>Software Testing&lt;/p>
&lt;p>Software Testing&lt;/p>
 
An overview to Software Testing
An overview to Software TestingAn overview to Software Testing
An overview to Software Testing
 
Automated testing of ASP .Net Core applications
Automated testing of ASP .Net Core applications Automated testing of ASP .Net Core applications
Automated testing of ASP .Net Core applications
 
How to improve your unit tests?
How to improve your unit tests?How to improve your unit tests?
How to improve your unit tests?
 
Ch11lect1 ud
Ch11lect1 udCh11lect1 ud
Ch11lect1 ud
 
Analysis
AnalysisAnalysis
Analysis
 
Software Engineering Lec 10 -software testing--
Software Engineering Lec 10 -software testing--Software Engineering Lec 10 -software testing--
Software Engineering Lec 10 -software testing--
 
Software engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit design
 

More from Ajeng Savitri

Software Testing Documentation
Software Testing DocumentationSoftware Testing Documentation
Software Testing DocumentationAjeng Savitri
 
Software Productivity Measurement
Software Productivity MeasurementSoftware Productivity Measurement
Software Productivity MeasurementAjeng Savitri
 
Software Testing Strategy (Part 2)
Software Testing Strategy (Part 2)Software Testing Strategy (Part 2)
Software Testing Strategy (Part 2)Ajeng Savitri
 
Methodology Selection Strategy
Methodology Selection Strategy Methodology Selection Strategy
Methodology Selection Strategy Ajeng Savitri
 
Software Testing - Software Quality (Part 2)
Software Testing - Software Quality (Part 2)Software Testing - Software Quality (Part 2)
Software Testing - Software Quality (Part 2)Ajeng Savitri
 
Software Testing - Software Quality
Software Testing - Software QualitySoftware Testing - Software Quality
Software Testing - Software QualityAjeng Savitri
 
Computer Evolution and Performance
Computer Evolution and PerformanceComputer Evolution and Performance
Computer Evolution and PerformanceAjeng Savitri
 
Requirement Gathering
Requirement GatheringRequirement Gathering
Requirement GatheringAjeng Savitri
 
Introduction to SDLC
Introduction to SDLC Introduction to SDLC
Introduction to SDLC Ajeng Savitri
 
Systems Analyst and Its Roles (2)
Systems Analyst and Its Roles (2)Systems Analyst and Its Roles (2)
Systems Analyst and Its Roles (2)Ajeng Savitri
 
Systems Analyst and Its Roles
Systems Analyst and Its RolesSystems Analyst and Its Roles
Systems Analyst and Its RolesAjeng Savitri
 
Algoritma Branch and Bound
Algoritma Branch and BoundAlgoritma Branch and Bound
Algoritma Branch and BoundAjeng Savitri
 
Algoritma Backtracking
Algoritma BacktrackingAlgoritma Backtracking
Algoritma BacktrackingAjeng Savitri
 

More from Ajeng Savitri (20)

Software Testing Documentation
Software Testing DocumentationSoftware Testing Documentation
Software Testing Documentation
 
Software Productivity Measurement
Software Productivity MeasurementSoftware Productivity Measurement
Software Productivity Measurement
 
Debugging
DebuggingDebugging
Debugging
 
Software Testing Strategy (Part 2)
Software Testing Strategy (Part 2)Software Testing Strategy (Part 2)
Software Testing Strategy (Part 2)
 
Methodology Selection Strategy
Methodology Selection Strategy Methodology Selection Strategy
Methodology Selection Strategy
 
Software Testing - Software Quality (Part 2)
Software Testing - Software Quality (Part 2)Software Testing - Software Quality (Part 2)
Software Testing - Software Quality (Part 2)
 
Software Testing - Software Quality
Software Testing - Software QualitySoftware Testing - Software Quality
Software Testing - Software Quality
 
Computer Evolution and Performance
Computer Evolution and PerformanceComputer Evolution and Performance
Computer Evolution and Performance
 
Sequence Diagram
Sequence DiagramSequence Diagram
Sequence Diagram
 
Activity Diagram
Activity DiagramActivity Diagram
Activity Diagram
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 
Requirement Gathering
Requirement GatheringRequirement Gathering
Requirement Gathering
 
Business Value
Business ValueBusiness Value
Business Value
 
Agile Development
Agile DevelopmentAgile Development
Agile Development
 
Structured Design
Structured DesignStructured Design
Structured Design
 
Introduction to SDLC
Introduction to SDLC Introduction to SDLC
Introduction to SDLC
 
Systems Analyst and Its Roles (2)
Systems Analyst and Its Roles (2)Systems Analyst and Its Roles (2)
Systems Analyst and Its Roles (2)
 
Systems Analyst and Its Roles
Systems Analyst and Its RolesSystems Analyst and Its Roles
Systems Analyst and Its Roles
 
Algoritma Branch and Bound
Algoritma Branch and BoundAlgoritma Branch and Bound
Algoritma Branch and Bound
 
Algoritma Backtracking
Algoritma BacktrackingAlgoritma Backtracking
Algoritma Backtracking
 

Recently uploaded

Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 

Recently uploaded (20)

Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 

Object Oriented Testing

  • 1. MEETING 8 OBJECT-ORIENTED TESTING SOFTWARE TESTING By : Ajeng Savitri Puspaningrum, M.Kom
  • 4. 4 INTRODUCTION • When object-oriented software is considered, the concept of the unit changes. • Encapsulation drives the definition of classes and objects. • An encapsulated class is usually the focus of unit testing
  • 5. 5 THE OBJECT-ORIENTED TESTING • The component being tested is class- object. • Larger than testing a function so the white-box testing approach needs to be expanded. • Unclear 'top' of a system for top-down integration and testing
  • 6. 6 OBJECT-ORIENTED TESTING VS OTHER • The most notable differences of object-oriented testing concern the phases of module and system testing • Due to modularization, there are more intraprocedural interdependencies. • Sharing of class members (fields) might couple methods of classes that are not meant to or at least do not appear to share data. • Programming for reusability and a more generalized functionality of classes introduces more possibilities to test them. • There is no linear growth between the size of the class and its complexity. • Code instrumentation is more complex. • Modularization, inheritance, and polymorphism have to be given special care.
  • 7. 7 HOW TO TEST THE OO-SYSTEM • Three things to consider when testing an OO system • The definition of testing should be expanded to include error finding techniques applied to the OOA(Object Oriented Analysis) and OOD(Object Oriented Design) models. • The unit testing strategy will become less meaningful and the integration strategy will have to change significantly • Test case design must account for the unique characteristics of OO software
  • 8. 8 THE ACTIVITIES • Reviewing the OOA and OOD models • Class Test after writing source program • Integration Test in subsystems • Integration Test of subsystems that have been added to the system • Validation Test based on OOA use-cases OOA and OOD cannot be tested but can be reviewed for correctness and consistency
  • 9. 9 CORRECTNESS • Syntactic • Defined by ensuring that modeling requirements and symbolism conventions are used • Semantics • Based on the accuracy of the model with real-world problem sources
  • 10. 10 CONSISTENCY 1. Review the CRC (class-responsibility- collaborator) model and the relationship diagram between objects. 2. Review system design (check object behavior model to check system behavior mapping to subsystems, review concurrency and task allocation, use use-case scenarios to check user interface design)
  • 11. 11 3. Object model test against object relation network to ensure that all object designs contains the attributes and operations required to carry out the collaboration defined for each CRC card. 4. Check the detailed specification of the algorithm used to carry out conventional operations using inspection techniques CONSISTENCY (CONT…)
  • 13. 13 UNIT TESTING IN OBJECT-ORIENTED • Concept of unit change • Smallest unit testable is encapsulated class or object • One operation can no longer be tested in isolation (conventional view of unit testing) but rather as part of a class • Does not test operations in isolation with other operations • Executed by class operations and fixed behavior, not algorithmic details and data flow across module interfaces
  • 14. 14 UNIT TESTING IN OBJECT-ORIENTED( C O NT … ) • Each of these methods will train an operation encapsulated by the class • The test sequence is designed to ensure that the relevant operations are tested • The fixed position of a class (its attribute value) is tested to determine if there are errors
  • 15. 15 TESTING ACTIVITIES • Test all operations related to objects • Manage and interrogate all object attributes • Train objects in all possibilities
  • 16. 16 TESTING DESIGN • Fault-based testing • Random testing • Partition testing
  • 17. 17 INTEGRATION TEST IN OBJECT-ORIENTED • Focused on classroom groups that collaborate or communicate in some way. • The integration of operations one by one into the class is often futile • Fewer different levels of integration in object-oriented systems
  • 18. 18 TESTING DESIGN • Thread-based testing integrates the set of classes required to respond to a single input or event for the system • Use-based testing starts the system building by testing those classes (called independent classes) that use very few (if any) server classes. After independent classes are tested, the next layer of classes, called dependent classes • Cluster testing defines a group of collaborating classes (determined by examining CRC and object-relationship models) carried out by designing test cases that seek to uncover errors in collaboration.
  • 19. 19 VALIDATION TESTING IN OBJECT-ORIENTED • Class connection details disappear • Describe use cases that are part of the requirements model • Focuses on visible user actions and users can recognize the output of the system • Validation tests are based on use-case scenarios, object behavior models, and event flowcharts created in the OOA model • Conventional black box testing can be used to drive validation tests
  • 21. 21 APPROACH • Each test case must be uniquely identified and must be explicitly associated with the class to be tested, • The purpose of the test should be stated, • Write down the test steps for each included test
  • 22. 22 TESTING STEPS • A list of test steps should be developed for each test and should contain: • List of states specified for the object to be tested • List of messages and operations to be performed as a consequence of testing • List of exceptions that can occur when the object is tested • List of external conditions (eg, environmental changes outside of the software that must be present in order to properly perform the test) • Additional information that will assist in understanding or carrying out the test.
  • 23. 23 TESTING SURFACE STRUCTURE AND DEEP STRUCTURE • Testing a surface structure • Is training a structure visible to the end user, often involving observing and interviewing users as they manipulate system objects. • Testing deep structure • Is training internal program structures, such as dependencies, behaviors, and communication mechanisms that exist as part of system and object design.
  • 24. 24 CLASS TESTING • Class testing for object-oriented (OO) software is the equivalent of unit testing for conventional software. • Driven by the operations encapsulated by the class and the state behavior of the class. • Method : • Random Testing • Partition testing • Fault-based testing
  • 25. 25 RANDOM TESTING • Requires a large number of permutations and combinations of data, and can be inefficient • Identify the operations that apply to a class • Define constraints on their use • Identify the minimum test sequence • Operations Sequence that define the minimum life history of a class (object) • Generate various random (but valid) test sequences • Other class example life history exercises (more complex)
  • 26. 26 PARTITION TESTING • Eliminates the number of test cases needed to test a class • State-based partitioning : tests are designed in such a way that operations that cause state changes are tested separately from those that do not. • Attribute-based partitioning : for each class attribute, operations are classified based on the user of the attribute, which modifies the attribute and which does not use or modify the attribute • Category-based partitioning : operations are categorized based on the function they perform, such as: initialization, computing, querying, termination
  • 27. 27 FAULT-BASED TESTING • Best for operations and class levels • Using inheritance structures • Testing examines the OOA model and hypothesizes a set of understood crashes that might occur in operation calls and message connections, and builds appropriate test cases • Finds incorrect specifications and errors in subsystem interactions
  • 28. 28 INTER-CLASS TESTING • Test case design becomes more complicated as does integration from the start of the OO system – testing collaboration between classes • Various class test, such as: • For each client class uses a class operator list to generate a sequence of random tests that send messages to the same server class else • For each message generated, specify the collaborator class and the designated server object operator • For each server operator class (requested by a message from the client object) specify the message sent • For each message, determine the next operator level requesting and combining them into the trial order
  • 29. 29 TEST DESIGN • Tests generated from behavioral models • Use a state transition diagram (STD) as a model that represents the dynamic behavior of a class. • Test cases should cover all stages of STD • Breadth first traversal of usable state models (test one transition at a time and only make use of previously tested transitions when testing new transitions) • Test cases can also be generated to ensure that all behavior for the class has been tested properly • Methods : • Cluster Testing • Use Case/Scenario-based Testing
  • 30. 30 CLUSTER TESTING • Focuses on integrating and testing groups of objects that work together • Identifying groups by using knowledge of the operation of objects and having systems implemented by these groups.
  • 31. 31 CLUSTER TESTING APPROACH • Use-case or scenario testing • Testing is based on user interaction with the system • Has the advantage that system testing features as experienced by users. • Thread testing : tests the response of the system to events as the thread processing through the system • Object interaction testing : tests the sequence of object interactions that stop when an object's operation does not call the service of another object
  • 32. 32 USE CASE/SCENARIO-BASED TESTING • Based on use-case and corresponding sequence diagram • Identify scenarios of use-cases and add to these with interaction diagrams showing the objects included in scenario • A scenario is a path through a sequence diagram • Concentrate on requirements (functional): • Every use case • Every expansion combination full extension (<<extend>>) • Every expansion of the full usage combination (<<uses>>) • Normal test like behavior
  • 33. 33 USE CASE/SCENARIO-BASED TESTING(CONT…) • Many different scenarios can be linked by a sequence diagram • Use the user tasks described in the use-cases and build test cases from these tasks and their variations • Find errors that arise when users interact with OO software • Concentrate on what the function does, not what the product does • Can get a greater return on the effort and time spent reviewing use-cases since they were created, than on wasting time on test use-cases
  • 34. 34 OO TEST DESIGN ISSUES • The white-box testing method can be applied to program usability testing to implement class operations but not to others • The black-box testing method is very appropriate for testing OO systems • Object-oriented programming creates additional requirements for testing, in the form of: • Classes can contains operations derived from super classes • Subclasses can contain operations that are redefined rather than derived • All classes generated from testing of previous base classes require further testing
  • 35. References Lewis, W. E. (2009). Software Testing And Continuous Quality Improvement ed. 3rd. Auerbach publications. 02 Majchrzak, T. A. (2012). Improving Software Testing: Technical And Organizational Developments. Springer Science & Business Media. 03 Myers, G. J., Sandler, C., & Badgett, T. (2012). The Art Of Software Testing. John Wiley & Sons. 04 Roger, S. P., & Bruce, R. M. (2019). Software Engineering: A Practitioner’s Approach Ed.9th. McGraw-Hill Education. 01
  • 36. THANK YOU Insert the Subtitle of Your Presentation