SlideShare a Scribd company logo
4
Most read
5
Most read
17
Most read
Slice based testing &
Object Oriented Testing
Varsha Sharma • 18010001030
Slice Based Testing
What’s Slice??
A program slice is a
subset of that program.
Varsha Sharma
Origin Story of Slicing Techniques . . ! !
● The Original definition was
given by Mark Weiser,
● slicing was only static that time.
● Bogdan Korel and Janusz Laski
introduced dynamic slicing.
Varsha Sharma
Also known as Program Slicing Technique...
● In this we takes a slice of the program for testing particular test
conditions or cases and that may affect a value at a particular point of
interest.
Useful
in
Debugging
Testing
Software
Quality
Assurance
Software
Maintenance
Filtering out
“Irrelevant
Code”.
Varsha Sharma
How it Works??
Breaking your code into smaller pieces.
Varsha Sharma
Static
Slicing Dynamic
Slicing
Types of Slicing
Varsha Sharma
Static Slicing
1. Set of all statements that may affect the
value of a variable at a program point.
2. Uses static information i.e. a source
program.
3. Regression Testing.
Varsha Sharma
Static Slicing
For variable sum.
int z = 10;
int n;
cin >> n;
int sum = 0;
if (n > 10)
sum = sum + n;
else
sum = sum - n;
cout << "Hey";
Let’s see an Example:
Static Slice of the Program
Varsha Sharma
1. Set of all statements that actually affect the
value of a variable at a program point.
2. Uses dynamic information i.e. an execution
trace.
3. Debugging.
Dynamic Slicing
Varsha Sharma
For variable sum when n=22.
int z = 10;
int n;
cin >> n;
int sum = 0;
if (n > 10)
sum = sum + n;
else
sum = sum - n;
cout << "Hey";
Let’s see an Example:
Dynamic Slice of the Program
Dynamic Slicing
Varsha Sharma
int z = 10;
int n;
cin >> n;
int sum = 0;
if (n > 10)
sum = sum + n;
else
sum = sum - n;
cout << "Hey";
int n;
cin >> n;
int sum = 0;
if (n > 10)
sum = sum + n;
int n;
cin >> n;
int sum = 0;
if (n > 10)
sum = sum + n;
else
sum = sum - n;
Static Slicing VS Dynamic Slicing
Varsha Sharma
Object Oriented Testing
As information systems are becoming more complex, the object-oriented paradigm
is gaining popularity because of its benefits in analysis, design, and coding.
Varsha Sharma
Varsha Sharma
Levels/Techniques of Object Oriented Testing :
Class Testing/ Unit
Testing
• Every individual
classes are tested
for errors or bugs.
Interclass Testing/
Integration testing/
Sub-system testing.
• Modules or sub-
systems are
tested and their
coordination with
other modules.
System Testing
• Whole System is
Tested.
Varsha Sharma
Class Testing Process
class
to be
tested
test cases
results
software
engineer
How to test?
Varsha Sharma
Developing Test Cases
Points to be noticed :
i. Identify each test case uniquely
ii. State the purpose of the test
iii. All the states of object that is to be tested should be
specified.
iv. External Conditions should be mentioned
v. Automated unit testing tools facilitate these requirements
Varsha Sharma
Issues in Object
Oriented Testing ??
1. Additional testing techniques are
required to test additional
Dependencies in Object Oriented
System.
2. it is not possible to test the class
dynamically
3. the concept of inheritance &
polymorphism opens various issues
4. Encapsulation in class may create
obstacles while testing.
5. State of object is difficult to acquire.
Varsha Sharma
Thank You…
Varsha Sharma

More Related Content

PPTX
VTU 6th Sem Elective CSE - Module 3 cloud computing
Sachin Gowda
 
PPTX
Osi reference model
vasanthimuniasamy
 
PDF
Target language in compiler design
Muhammad Haroon
 
PPTX
Deadlock ppt
Sweetestangel Kochar
 
PPTX
Issues in knowledge representation
Sravanthi Emani
 
PPTX
Graph coloring using backtracking
shashidharPapishetty
 
PPT
Coda file system
Sneh Pahilwani
 
PPTX
Dijkstra's algorithm
Anaya Zafar
 
VTU 6th Sem Elective CSE - Module 3 cloud computing
Sachin Gowda
 
Osi reference model
vasanthimuniasamy
 
Target language in compiler design
Muhammad Haroon
 
Deadlock ppt
Sweetestangel Kochar
 
Issues in knowledge representation
Sravanthi Emani
 
Graph coloring using backtracking
shashidharPapishetty
 
Coda file system
Sneh Pahilwani
 
Dijkstra's algorithm
Anaya Zafar
 

What's hot (20)

PPTX
Data Designs (Software Engg.)
Arun Shukla
 
PPTX
Challenges of Conventional Systems.pptx
GovardhanV7
 
PDF
Chapter 8
pavan penugonda
 
PPTX
Characteristics of cloud computing
GOVERNMENT COLLEGE OF ENGINEERING,TIRUNELVELI
 
PPT
Chapter 4 data link layer
Naiyan Noor
 
PPTX
Ppt 11 - netopeer
udhayakumarc1
 
PDF
Cloud Computing Architecture
Animesh Chaturvedi
 
PPT
Snmp
hetaljadav
 
PPTX
Error Detection & Recovery
Akhil Kaushik
 
PPTX
M2M technology in IOT
shashidharPapishetty
 
PPTX
Mac protocols
juno susi
 
PPTX
Virtualization in cloud computing
Mohammad Ilyas Malik
 
PPTX
Introduction TO Finite Automata
Ratnakar Mikkili
 
PDF
Distributed Operating System_4
Dr Sandeep Kumar Poonia
 
PPTX
Transport layer protocol
N.Jagadish Kumar
 
PPT
Transaction management and concurrency control
Dhani Ahmad
 
PPT
distributed shared memory
Ashish Kumar
 
PPT
Types of Load distributing algorithm in Distributed System
DHIVYADEVAKI
 
PPTX
15 puzzle problem using branch and bound
Abhishek Singh
 
PPTX
Parsing in Compiler Design
Akhil Kaushik
 
Data Designs (Software Engg.)
Arun Shukla
 
Challenges of Conventional Systems.pptx
GovardhanV7
 
Chapter 8
pavan penugonda
 
Characteristics of cloud computing
GOVERNMENT COLLEGE OF ENGINEERING,TIRUNELVELI
 
Chapter 4 data link layer
Naiyan Noor
 
Ppt 11 - netopeer
udhayakumarc1
 
Cloud Computing Architecture
Animesh Chaturvedi
 
Error Detection & Recovery
Akhil Kaushik
 
M2M technology in IOT
shashidharPapishetty
 
Mac protocols
juno susi
 
Virtualization in cloud computing
Mohammad Ilyas Malik
 
Introduction TO Finite Automata
Ratnakar Mikkili
 
Distributed Operating System_4
Dr Sandeep Kumar Poonia
 
Transport layer protocol
N.Jagadish Kumar
 
Transaction management and concurrency control
Dhani Ahmad
 
distributed shared memory
Ashish Kumar
 
Types of Load distributing algorithm in Distributed System
DHIVYADEVAKI
 
15 puzzle problem using branch and bound
Abhishek Singh
 
Parsing in Compiler Design
Akhil Kaushik
 
Ad

Similar to Slice Based testing and Object Oriented Testing (20)

PDF
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
QA or the Highway
 
PPT
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Engineering Software Lab
 
PDF
Experience Sharing on School Pentest Project
eLearning Consortium 電子學習聯盟
 
PPT
Types of Software Testing
Nishant Worah
 
DOCX
Network intrusion detection using supervised machine learning technique with ...
Venkat Projects
 
PPT
12 functional-system-testing
nickynicks76
 
PPTX
Test Coverage: An Art and a Science
TeamQualityPro
 
PDF
Finding Bugs Faster with Assertion Based Verification (ABV)
DVClub
 
PPT
provoora
lmscollaborative2
 
PPT
finalelocale
lmscollaborative2
 
PPT
domenica2
lmscollaborative2
 
PPT
provacompleta3
lmscollaborative2
 
PPT
domenica1
lmscollaborative2
 
PPT
testsfw5
lmscollaborative2
 
PPT
provacompleta4
lmscollaborative2
 
PPT
prova1
mbsoftware
 
PPT
provaoggi2
lmscollaborative2
 
PPT
prova5
mbsoftware
 
PPT
prova3
mbsoftware
 
PPT
domenica3
lmscollaborative2
 
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
QA or the Highway
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Engineering Software Lab
 
Experience Sharing on School Pentest Project
eLearning Consortium 電子學習聯盟
 
Types of Software Testing
Nishant Worah
 
Network intrusion detection using supervised machine learning technique with ...
Venkat Projects
 
12 functional-system-testing
nickynicks76
 
Test Coverage: An Art and a Science
TeamQualityPro
 
Finding Bugs Faster with Assertion Based Verification (ABV)
DVClub
 
finalelocale
lmscollaborative2
 
provacompleta3
lmscollaborative2
 
provacompleta4
lmscollaborative2
 
prova1
mbsoftware
 
provaoggi2
lmscollaborative2
 
prova5
mbsoftware
 
prova3
mbsoftware
 
Ad

Recently uploaded (20)

PDF
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
PPTX
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
DOCX
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
PDF
Virat Kohli- the Pride of Indian cricket
kushpar147
 
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PPTX
Trends in pediatric nursing .pptx
AneetaSharma15
 
DOCX
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
PPTX
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PDF
Study Material and notes for Women Empowerment
ComputerScienceSACWC
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
DOCX
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
PPTX
Autodock-for-Beginners by Rahul D Jawarkar.pptx
Rahul Jawarkar
 
PDF
RA 12028_ARAL_Orientation_Day-2-Sessions_v2.pdf
Seven De Los Reyes
 
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
Virat Kohli- the Pride of Indian cricket
kushpar147
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
Trends in pediatric nursing .pptx
AneetaSharma15
 
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Study Material and notes for Women Empowerment
ComputerScienceSACWC
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
Autodock-for-Beginners by Rahul D Jawarkar.pptx
Rahul Jawarkar
 
RA 12028_ARAL_Orientation_Day-2-Sessions_v2.pdf
Seven De Los Reyes
 

Slice Based testing and Object Oriented Testing

  • 1. Slice based testing & Object Oriented Testing Varsha Sharma • 18010001030
  • 2. Slice Based Testing What’s Slice?? A program slice is a subset of that program. Varsha Sharma
  • 3. Origin Story of Slicing Techniques . . ! ! ● The Original definition was given by Mark Weiser, ● slicing was only static that time. ● Bogdan Korel and Janusz Laski introduced dynamic slicing. Varsha Sharma
  • 4. Also known as Program Slicing Technique... ● In this we takes a slice of the program for testing particular test conditions or cases and that may affect a value at a particular point of interest. Useful in Debugging Testing Software Quality Assurance Software Maintenance Filtering out “Irrelevant Code”. Varsha Sharma
  • 5. How it Works?? Breaking your code into smaller pieces. Varsha Sharma
  • 7. Static Slicing 1. Set of all statements that may affect the value of a variable at a program point. 2. Uses static information i.e. a source program. 3. Regression Testing. Varsha Sharma
  • 8. Static Slicing For variable sum. int z = 10; int n; cin >> n; int sum = 0; if (n > 10) sum = sum + n; else sum = sum - n; cout << "Hey"; Let’s see an Example: Static Slice of the Program Varsha Sharma
  • 9. 1. Set of all statements that actually affect the value of a variable at a program point. 2. Uses dynamic information i.e. an execution trace. 3. Debugging. Dynamic Slicing Varsha Sharma
  • 10. For variable sum when n=22. int z = 10; int n; cin >> n; int sum = 0; if (n > 10) sum = sum + n; else sum = sum - n; cout << "Hey"; Let’s see an Example: Dynamic Slice of the Program Dynamic Slicing Varsha Sharma
  • 11. int z = 10; int n; cin >> n; int sum = 0; if (n > 10) sum = sum + n; else sum = sum - n; cout << "Hey"; int n; cin >> n; int sum = 0; if (n > 10) sum = sum + n; int n; cin >> n; int sum = 0; if (n > 10) sum = sum + n; else sum = sum - n; Static Slicing VS Dynamic Slicing Varsha Sharma
  • 12. Object Oriented Testing As information systems are becoming more complex, the object-oriented paradigm is gaining popularity because of its benefits in analysis, design, and coding. Varsha Sharma
  • 14. Levels/Techniques of Object Oriented Testing : Class Testing/ Unit Testing • Every individual classes are tested for errors or bugs. Interclass Testing/ Integration testing/ Sub-system testing. • Modules or sub- systems are tested and their coordination with other modules. System Testing • Whole System is Tested. Varsha Sharma
  • 15. Class Testing Process class to be tested test cases results software engineer How to test? Varsha Sharma
  • 16. Developing Test Cases Points to be noticed : i. Identify each test case uniquely ii. State the purpose of the test iii. All the states of object that is to be tested should be specified. iv. External Conditions should be mentioned v. Automated unit testing tools facilitate these requirements Varsha Sharma
  • 17. Issues in Object Oriented Testing ?? 1. Additional testing techniques are required to test additional Dependencies in Object Oriented System. 2. it is not possible to test the class dynamically 3. the concept of inheritance & polymorphism opens various issues 4. Encapsulation in class may create obstacles while testing. 5. State of object is difficult to acquire. Varsha Sharma

Editor's Notes

  • #2: Where are these notes visible??
  • #5: Program slices are more manageable for testing and debugging rather than taking up whole code. • During testing, debugging, or understanding a program, most of the code in the program is irrelevant to what you are interested in. • Program slicing provides a convenient way of filtering out “irrelevant” code.
  • #6: Slicing criterion may include: Slicing variable: Slicing variable may be based on the variables specified in the criteria (slicing point of interest) or it may be on all variables. Type of the result: The result of slicing may be equivalent to the program of few set of statements from the program. Slicing Point: Considering the Slicing point, programmer interest may be before or after a particular statement [4]. Scope: The scope of the slice may be interprocedural or it may be intraprocedural [30]. Slicing Direction: The expected slice from the program may be in the forward or backward direction. Type of Information: The information that we obtain from the slice will be either a static or it may be a dynamic one. Output format: The format that can be obtained after slicing may seem to be in the form of code which is equivalent to source code or it may be a dependence graph or may be in the form of execution tree.
  • #8: A static slice of a program contains all statements that may affect the value of a variable at any point for any arbitrary execution of the program. Static slices are generally larger. It considers every possible execution of the program.
  • #10: A dynamic slice of a program contains all the statements that actually affect the value of a variable at any point for a particular execution of the program. Dynamic slices are generally smaller. Considers only a particular execution of the program.
  • #12: static slice takes all the possible execution (in this case it is 2) of the program which may affect the value of the variable sum. Whereas in case of dynamic slicing, it considers only a particular execution (when n = 22) of the program which may affect the value of the variable sum.
  • #13: Whenever large scale systems are designed, object oriented testing is done rather than the conventional testing as the concepts of object oriented programming is way easy than conventional ones.  this testing revolves around the fundamental entity known as “class”.  With this ,the larger systems are divided into small units which may then be implemented separately.
  • #14: We are aware of OOP that it is a particular way of programming that leverage the concept of Classes and Objects and the 4 paradigms of Object Oriented Programming that are Abstraction: a process where you show only “relevant” data and “hide” unnecessary details of an object from the user. Encapsulation: a practice that bind the data with the code that manipulates it and keeps the data and the code safe from external interference Inheritance: the mechanism by which an object acquires the some (or all) properties of another object. Polymorphism: a way to process objects differently based on their data type. In other words objects can have the same name for a method but the implementation may differ.
  • #15: Class testing ensures that the attributes of class are implemented as per the design and specifications. Also, it checks whether the interfaces and methods are error free of not. - System testing: the system is tested as whole and primarily functional testing techniques are used to test the system. Non- functional requirements like performance, reliability, usability and test-ability are also tested.
  • #17: Identify each test case uniquely - Associate test case explicitly with the class and/or method to be tested State the purpose of the test Each test case should contain: 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 conditions for setup (i.e., 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 Automated unit testing tools facilitate these requirements
  • #18: the dependencies occurring in conventional systems are: Data dependencies between variables Calling dependencies between modules Functional dependencies between a module and the variable it computes Definitional dependencies between a variable and its types. But in Object-Oriented systems there are following additional dependencies: Class to class dependencies Class to method dependencies Class to message dependencies Class to variable dependencies Method to variable dependencies Method to message dependencies Method to method dependencies 2. it is not possible to test the class dynamically, only its instances i.e, objects can be tested. 3. the concept of inheritance opens various issues e.g., if changes are made to a parent class or superclass, in a larger system of a class it will be difficult to test subclasses individually and isolate the error to one class. Test cases designed for base class are not applicable to derived class. 4. Encapsulation of attributes and methods in class may create obstacles while testing. As methods are invoked through the object of corresponding class, testing cannot be accomplished without object. 5. In addition, the state of object at the time of invocation of method affects its behavior. Hence, testing depends not only on the object but on the state of object also, which is very difficult to acquire.