SlideShare a Scribd company logo
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

What's hot

Staffing level estimation
Staffing level estimation Staffing level estimation
Staffing level estimation
kavitha muneeshwaran
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9koolkampus
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corbaMayuresh Wadekar
 
Software testing
Software testing Software testing
Software testing
Kunal Prajapati
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
Babeetha Muruganantham
 
Elaboration and domain model
Elaboration and domain modelElaboration and domain model
Elaboration and domain model
Vignesh Saravanan
 
Vc dimension in Machine Learning
Vc dimension in Machine LearningVc dimension in Machine Learning
Vc dimension in Machine Learning
VARUN KUMAR
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and Lexeme
A. S. M. Shafi
 
Control Flow Testing
Control Flow TestingControl Flow Testing
Control Flow Testing
Hirra Sultan
 
Unit testing
Unit testing Unit testing
Unit testing
Mani Kanth
 
Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler Design
Kuppusamy P
 
Learning rule of first order rules
Learning rule of first order rulesLearning rule of first order rules
Learning rule of first order rules
swapnac12
 
Basic cellular system
Basic cellular systemBasic cellular system
Basic cellular system
ShubhamMishra485
 
Hidden & exposed terminal problem
Hidden & exposed terminal problemHidden & exposed terminal problem
Hidden & exposed terminal problem
VirendraKhatarkar
 
Time advance mehcanism
Time advance mehcanismTime advance mehcanism
Time advance mehcanism
Nikhil Sharma
 
Target language in compiler design
Target language in compiler designTarget language in compiler design
Target language in compiler design
Muhammad Haroon
 
Signals and Antennas in mobile computing
Signals and Antennas in mobile computingSignals and Antennas in mobile computing
Signals and Antennas in mobile computing
Madhuri Badgujar
 
Mobile Network Layer
Mobile Network LayerMobile Network Layer
Mobile Network Layer
Rahul Hada
 
Context model
Context modelContext model
Context model
Ubaid423
 
Address in the target code in Compiler Construction
Address in the target code in Compiler ConstructionAddress in the target code in Compiler Construction
Address in the target code in Compiler Construction
Muhammad Haroon
 

What's hot (20)

Staffing level estimation
Staffing level estimation Staffing level estimation
Staffing level estimation
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corba
 
Software testing
Software testing Software testing
Software testing
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
 
Elaboration and domain model
Elaboration and domain modelElaboration and domain model
Elaboration and domain model
 
Vc dimension in Machine Learning
Vc dimension in Machine LearningVc dimension in Machine Learning
Vc dimension in Machine Learning
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and Lexeme
 
Control Flow Testing
Control Flow TestingControl Flow Testing
Control Flow Testing
 
Unit testing
Unit testing Unit testing
Unit testing
 
Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler Design
 
Learning rule of first order rules
Learning rule of first order rulesLearning rule of first order rules
Learning rule of first order rules
 
Basic cellular system
Basic cellular systemBasic cellular system
Basic cellular system
 
Hidden & exposed terminal problem
Hidden & exposed terminal problemHidden & exposed terminal problem
Hidden & exposed terminal problem
 
Time advance mehcanism
Time advance mehcanismTime advance mehcanism
Time advance mehcanism
 
Target language in compiler design
Target language in compiler designTarget language in compiler design
Target language in compiler design
 
Signals and Antennas in mobile computing
Signals and Antennas in mobile computingSignals and Antennas in mobile computing
Signals and Antennas in mobile computing
 
Mobile Network Layer
Mobile Network LayerMobile Network Layer
Mobile Network Layer
 
Context model
Context modelContext model
Context model
 
Address in the target code in Compiler Construction
Address in the target code in Compiler ConstructionAddress in the target code in Compiler Construction
Address in the target code in Compiler Construction
 

Similar to Slice Based testing and Object Oriented Testing

The Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverThe Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
QA or the Highway
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Engineering Software Lab
 
Experience Sharing on School Pentest Project
Experience Sharing on School Pentest ProjectExperience Sharing on School Pentest Project
Experience Sharing on School Pentest Project
eLearning Consortium 電子學習聯盟
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software TestingNishant Worah
 
Network intrusion detection using supervised machine learning technique with ...
Network intrusion detection using supervised machine learning technique with ...Network intrusion detection using supervised machine learning technique with ...
Network intrusion detection using supervised machine learning technique with ...
Venkat Projects
 
12 functional-system-testing
12 functional-system-testing12 functional-system-testing
12 functional-system-testingnickynicks76
 
Test Coverage: An Art and a Science
Test Coverage: An Art and a ScienceTest Coverage: An Art and a Science
Test Coverage: An Art and a Science
TeamQualityPro
 
Finding Bugs Faster with Assertion Based Verification (ABV)
Finding Bugs Faster with Assertion Based Verification (ABV)Finding Bugs Faster with Assertion Based Verification (ABV)
Finding Bugs Faster with Assertion Based Verification (ABV)DVClub
 

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

The Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverThe Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
 
Experience Sharing on School Pentest Project
Experience Sharing on School Pentest ProjectExperience Sharing on School Pentest Project
Experience Sharing on School Pentest Project
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software Testing
 
Network intrusion detection using supervised machine learning technique with ...
Network intrusion detection using supervised machine learning technique with ...Network intrusion detection using supervised machine learning technique with ...
Network intrusion detection using supervised machine learning technique with ...
 
12 functional-system-testing
12 functional-system-testing12 functional-system-testing
12 functional-system-testing
 
Test Coverage: An Art and a Science
Test Coverage: An Art and a ScienceTest Coverage: An Art and a Science
Test Coverage: An Art and a Science
 
Finding Bugs Faster with Assertion Based Verification (ABV)
Finding Bugs Faster with Assertion Based Verification (ABV)Finding Bugs Faster with Assertion Based Verification (ABV)
Finding Bugs Faster with Assertion Based Verification (ABV)
 
prova4
prova4prova4
prova4
 
provalast
provalastprovalast
provalast
 
test3
test3test3
test3
 
test
testtest
test
 
prova2
prova2prova2
prova2
 
testsfw2
testsfw2testsfw2
testsfw2
 
prova2
prova2prova2
prova2
 
test2
test2test2
test2
 
testsfw7
testsfw7testsfw7
testsfw7
 
testsfw4
testsfw4testsfw4
testsfw4
 
domenica3
domenica3domenica3
domenica3
 
prova9
prova9prova9
prova9
 

Recently uploaded

Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Landownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptxLandownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptx
JezreelCabil2
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 

Recently uploaded (20)

Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Landownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptxLandownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 

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

  1. Where are these notes visible??
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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
  11. 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.