SlideShare a Scribd company logo
10- Verification and Validation
• Assuring that a software system
meets a user’s needs
• Verification:
• “Are we building the product right”
– The software should conform to its specification.
• Validation:
• “Are we building the right product”
– The software should do what the user really requires.
Verification vs Validation
• Is a whole life-cycle process - V & V must be
applied at each stage in the software process.
• Has two principal objectives:
– The discovery of defects in a system.
– The assessment of whether or not the system is
usable in an operational situation.
The V & V Process
• Dynamic V & V Concerned with exercising
and observing product behavior (testing).
• Static verification Concerned with analysis
of the static system representation to
discover problems.
Dynamic and Static Verification
Static and Dynamic V&V
Formal
specification
High-level
design
Requirements
specification
Detailed
design
Program
Prototype
Dynamic
validation
Static
verification
Example
Testing – Terminology
• Test case
– Individual test
• Test suite
– Collection of test cases
• Test harness
– Program that executes a series of test cases
• Test framework
– Software that facilitates writing & running tests
– Example – JUnit
Testing – Terminology
• Test driver
– Program to create environment for running tests
– Declares variables, creates objects, assigns values
– Executes code and displays results of tests
• Tester (Quality Assurance)
– Person devising and / or performing tests
– More effective if 2nd person writes tests
• Walkthrough
– Programmer explains code to 2nd person
Types of Testing
• Program testing can be used to show the
presence of bugs, but never their absence.”
• Static: Done without actually executing program
– Code inspections
– Walkthroughs
• Dynamic: Done by executing program or its parts
– Module or unit testing
– Integration testing
– System testing
Who Tests the Software?
developer independent tester
Understands the system
but, will test "gently"
and, is driven by
"delivery"
Must learn about the system,
but, will attempt to break it
and, is driven by quality
Testing Principles
• All tests should be traceable to customer
requirements.
• Tests should be planned before testing begins.
• 80% of all errors are in 20% of the code.
• Testing should begin in the small and progress to
the large.
• Exhaustive testing is not possible.
• Testing should be conducted by an independent
third party if possible.
Software Defect Causes
• Specification may be wrong.
• Specification may be a physical impossibility.
• Faulty program design.
• Program may be incorrect.
Types of Errors
• Algorithmic error.
• Computation & precision error.
• Documentation error.
• Capacity error or boundary error.
• Timing and coordination error.
• Performance error.
• Recovery error.
• Hardware & system software error.
• Standards & procedure errors.
Test Strategies
• Black-box or behavioral testing
– knowing the specified function a product is to
perform and demonstrating correct operation based
solely on its specification without regard for its
internal logic
• White-box or glass-box testing
– knowing the internal workings of a product, tests
are performed to check the workings of all possible
logic paths
Black-box Testing
• Focus: I/O behavior. If for any given input, we can predict the
output, then the module passes the test.
– Almost always impossible to generate all possible inputs
("test cases")
• Goal: Reduce number of test cases by equivalence
partitioning:
– Divide input conditions into equivalence classes
– Choose test cases for each equivalence class. (Example: If
an object is supposed to accept a negative number, testing
one negative number is enough)
Black-box Testing (Continued)
• Selection of equivalence classes (No rules, only guidelines):
– Input is valid across range of values. Select test cases from
3 equivalence classes:
• Below the range
• Within the range
• Above the range
– Input is valid if it is from a discrete set. Select test cases
from 2 equivalence classes:
• Valid discrete value
• Invalid discrete value
• Another solution to select only a limited amount of test cases:
– Get knowledge about the inner workings of the unit being
tested => white-box testing
White-box Testing
• Focus: Thoroughness (Coverage). Every statement in
the component is executed at least once.
• Four types of white-box testing
– Statement Testing
– Loop Testing
– Path Testing
– Branch Testing
White-box Testing (Continued)
• Statement Testing (Algebraic Testing): Test single statements
(Choice of operators in polynomials, etc)
• Loop Testing:
– Cause execution of the loop to be skipped completely.
(Exception: Repeat loops)
– Loop to be executed exactly once
– Loop to be executed more than once
• Path testing:
– Make sure all paths in the program are executed
• Branch Testing (Conditional Testing): Make sure that each
possible outcome from a condition is tested at least once
• Unit testing
– testing of individual components
• Module testing
– testing of collections of dependent components
• Sub-system testing
– testing collections of modules integrated into sub-systems
• System testing
– testing the complete system prior to delivery
• Acceptance testing
– testing by users to check that the system satisfies
requirements. Sometimes called alpha testing
Testing Stages
The Testing Process
Sub-system
testing
Module
testing
Unit
testing
System
testing
Acceptance
testing
Component
testing
Integration testing User
testing
Unit Testing
• Program reviews.
• Formal verification.
• Testing the program itself.
– black box and white box testing.
Types of Testing
• Unit Testing:
– Individual subsystem
– Carried out by developers
– Goal: Confirm that subsystems is correctly coded
and carries out the intended functionality
• Integration Testing:
– Groups of subsystems (collection of classes) and
eventually the entire system
– Carried out by developers
– Goal: Test the interface among the subsystem
System Testing
• System Testing:
– The entire system
– Carried out by developers
– Goal: Determine if the system meets the requirements
(functional and global)
• Acceptance Testing:
– Evaluates the system delivered by developers
– Carried out by the client. May involve executing typical
transactions on site on a trial basis
– Goal: Demonstrate that the system meets customer
requirements and is ready to use
• Implementation (Coding) and testing go hand in hand
Eaxample:Test Cases
• Test case 1 : ? (To execute loop exactly
once)
• Test case 2 : ? (To skip loop body)
• Test case 3: ?,? (to execute loop more
than once)
These 3 test cases cover all control flow
paths
Generating Test Data
• Ideally want to test every permutation of valid
and invalid inputs
• Equivalence partitioning it often required to
reduce to infinite test case sets
– Every possible input belongs to one of the
equivalence classes.
– No input belongs to more than one class.
– Each point is representative of class.
Regression Testing
• Check for defects propagated to other modules by
changes made to existing program
– Representative sample of existing test cases is used to
exercise all software functions.
– Additional test cases focusing software functions likely to
be affected by the change.
– Tests cases that focus on the changed software components.
Integration Testing
• Bottom - up testing (test harness).
• Top - down testing (stubs).
• Modified top - down testing - test levels
independently.
• Big Bang.
• Sandwich testing.
Top-Down Integration Testing
• Main program used as a test driver and stubs are
substitutes for components directly subordinate to it.
• Subordinate stubs are replaced one at a time with real
components (following the depth-first or breadth-first
approach).
• Tests are conducted as each component is integrated.
• On completion of each set of tests and other stub is
replaced with a real component.
• Regression testing may be used to ensure that new
errors not introduced.
Bottom-Up Integration Testing
• Low level components are combined in clusters that
perform a specific software function.
• A driver (control program) is written to coordinate
test case input and output.
• The cluster is tested.
• Drivers are removed and clusters are combined
moving upward in the program structure.
Acceptance Testing
• Making sure the software works correctly for
intended user in his or her normal work
environment.
• Alpha test
– version of the complete software is tested by customer
under the supervision of the developer at the
developer’s site
• Beta test
– version of the complete software is tested by customer
at his or her own site without the developer being
present
System Testing
• Recovery testing
– checks system’s ability to recover from failures
• Security testing
– verifies that system protection mechanism prevents
improper penetration or data alteration
• Stress testing
– program is checked to see how well it deals with
abnormal resource demands
• Performance testing
– tests the run-time performance of software
Performance Testing
• Stress test.
• Volume test.
• Configuration test
(hardware &
software).
• Compatibility.
• Regression tests.
• Security tests.
• Timing tests.
• Environmental tests.
• Quality tests.
• Recovery tests.
• Maintenance tests.
• Documentation tests.
• Human factors tests.
Testing Life Cycle
• Establish test objectives.
• Design criteria (review criteria).
– Correct.
– Feasible.
– Coverage.
– Demonstrate functionality .
• Writing test cases.
• Testing test cases.
• Execute test cases.
• Evaluate test results.
Testing Tools
• Simulators.
• Monitors.
• Analyzers.
• Test data generators.
Test Team Members
• Professional testers.
• Analysts.
• System designers.
• Configuration management specialists.
• Users.
Test Documentation Needed
• Requirement being tested.
• Design verification methodology.
• Code verification methodology.
Document Each Test Case
• Requirement tested.
• Facet / feature / path tested.
• Person & date.
• Tools & code needed.
• Test data & instructions.
• Expected results.
• Actual test results & analysis
• Correction, schedule, and signoff.
Test Case Design
"Bugs lurk in corners
and congregate at
boundaries ..."
Boris Beizer
OBJECTIVE
CRITERIA
CONSTRAINT
to uncover errors
in a complete manner
with a minimum of effort and time
Debugging
• Debugging (removal of a defect) occurs as a
consequence of successful testing.
• Some people better at debugging than others.
• Is the cause of the bug reproduced in another
part of the program?
• What “next bug” might be introduced by the fix
that is being proposed?
• What could have been done to prevent this bug
in the first place?
The Debugging Process
Locate
error
Design
error repair
Repair
error
Re-test
program
Debugging Approaches
• Brute force
– memory dumps and run-time traces are examined for
clues to error causes
• Backtracking
– source code is examined by looking backwards from
symptom to potential causes of errors
• Cause elimination
– uses binary partitioning to reduce the number of
locations potential where errors can exist
End of lecture

More Related Content

What's hot

Manual testing - Introduction to Manual Software testing
Manual testing - Introduction to Manual Software testingManual testing - Introduction to Manual Software testing
Manual testing - Introduction to Manual Software testing
Vibrant Technologies & Computers
 
Lec25
Lec25Lec25
debugging and testing
debugging and testingdebugging and testing
debugging and testing
Sevajothi Crafts
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
Haris Jamil
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
Alpana Bhaskar
 
Paper CS
Paper CSPaper CS
Paper CS
techweb08
 
Testing strategies
Testing strategiesTesting strategies
Testing strategies
chaitanya_yarlagadda
 
Fundamentals of software part 1
Fundamentals of software part 1Fundamentals of software part 1
Fundamentals of software part 1
Siddharth Sharma
 
Manual testing
Manual testingManual testing
Manual testing
ShahaniIntikab
 
Software Testing
Software TestingSoftware Testing
Software Testing
Abhishek Saxena
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
Jayant Dalvi
 
Test case design
Test case designTest case design
Test case design
99pillar
 
Validation testing
Validation testingValidation testing
Validation testing
Slideshare
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
didev
 
Testing strategies part -1
Testing strategies part -1Testing strategies part -1
Testing strategies part -1
Divya Tiwari
 
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
Maitree Patel
 
Software testing
Software testingSoftware testing
Software testing
Bhagyashree pathak
 
ITFT--Software testing
ITFT--Software testingITFT--Software testing
ITFT--Software testing
Shifali Sharma
 
Testing
TestingTesting
Testing
Ajeng Savitri
 

What's hot (19)

Manual testing - Introduction to Manual Software testing
Manual testing - Introduction to Manual Software testingManual testing - Introduction to Manual Software testing
Manual testing - Introduction to Manual Software testing
 
Lec25
Lec25Lec25
Lec25
 
debugging and testing
debugging and testingdebugging and testing
debugging and testing
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
 
Paper CS
Paper CSPaper CS
Paper CS
 
Testing strategies
Testing strategiesTesting strategies
Testing strategies
 
Fundamentals of software part 1
Fundamentals of software part 1Fundamentals of software part 1
Fundamentals of software part 1
 
Manual testing
Manual testingManual testing
Manual testing
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
 
Test case design
Test case designTest case design
Test case design
 
Validation testing
Validation testingValidation testing
Validation testing
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Testing strategies part -1
Testing strategies part -1Testing strategies part -1
Testing strategies part -1
 
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
 
Software testing
Software testingSoftware testing
Software testing
 
ITFT--Software testing
ITFT--Software testingITFT--Software testing
ITFT--Software testing
 
Testing
TestingTesting
Testing
 

Similar to Software Engineering Lec 10 -software testing--

SENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptxSENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptx
MinsasWorld
 
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
ShudipPal
 
testing strategies and tactics
 testing strategies and tactics testing strategies and tactics
testing strategies and tactics
Preeti Mishra
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
Saqib Raza
 
An overview to Software Testing
An overview to Software TestingAn overview to Software Testing
An overview to Software Testing
Atul Mishra
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
Rohit846825
 
Software testing software engineering.pdf
Software testing software engineering.pdfSoftware testing software engineering.pdf
Software testing software engineering.pdf
vaibhavshukla3003
 
Software testing strategies And its types
Software testing  strategies And its typesSoftware testing  strategies And its types
Software testing strategies And its types
MITULJAMANG
 
Software Engineering (Testing Overview)
Software Engineering (Testing Overview)Software Engineering (Testing Overview)
Software Engineering (Testing Overview)
ShudipPal
 
Software testing part
Software testing partSoftware testing part
Software testing part
Preeti Mishra
 
Lect-6-Generic testing types.pptx
Lect-6-Generic testing types.pptxLect-6-Generic testing types.pptx
Lect-6-Generic testing types.pptx
abdullahsaddique2
 
Testing fundamentals
Testing fundamentalsTesting fundamentals
Testing fundamentals
Raviteja Chowdary Adusumalli
 
Agile Software Testing the Agilogy Way
Agile Software Testing the Agilogy WayAgile Software Testing the Agilogy Way
Agile Software Testing the Agilogy Way
Jordi Pradel
 
A Software Testing Intro
A Software Testing IntroA Software Testing Intro
A Software Testing Intro
Evozon Test Lab
 
Software testing
Software testingSoftware testing
Software testing
Shah Ishtiyaq Mehfooze
 
Module V - Software Testing Strategies.pdf
Module V - Software Testing Strategies.pdfModule V - Software Testing Strategies.pdf
Module V - Software Testing Strategies.pdf
adhithanr
 
Manual Testing software testing all slide
Manual Testing software testing all slideManual Testing software testing all slide
Manual Testing software testing all slide
SmileySmiley39
 
manualtesting-170218090020 (1).pdf
manualtesting-170218090020 (1).pdfmanualtesting-170218090020 (1).pdf
manualtesting-170218090020 (1).pdf
peramdevi06
 
SOFTWARE TESTING W4_watermark.pdf
SOFTWARE TESTING W4_watermark.pdfSOFTWARE TESTING W4_watermark.pdf
SOFTWARE TESTING W4_watermark.pdf
GayathriRHICETCSESTA
 
Software testing & its technology
Software testing & its technologySoftware testing & its technology
Software testing & its technology
Hasam Panezai
 

Similar to Software Engineering Lec 10 -software testing-- (20)

SENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptxSENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptx
 
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
 
testing strategies and tactics
 testing strategies and tactics testing strategies and tactics
testing strategies and tactics
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
 
An overview to Software Testing
An overview to Software TestingAn overview to Software Testing
An overview to Software Testing
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
Software testing software engineering.pdf
Software testing software engineering.pdfSoftware testing software engineering.pdf
Software testing software engineering.pdf
 
Software testing strategies And its types
Software testing  strategies And its typesSoftware testing  strategies And its types
Software testing strategies And its types
 
Software Engineering (Testing Overview)
Software Engineering (Testing Overview)Software Engineering (Testing Overview)
Software Engineering (Testing Overview)
 
Software testing part
Software testing partSoftware testing part
Software testing part
 
Lect-6-Generic testing types.pptx
Lect-6-Generic testing types.pptxLect-6-Generic testing types.pptx
Lect-6-Generic testing types.pptx
 
Testing fundamentals
Testing fundamentalsTesting fundamentals
Testing fundamentals
 
Agile Software Testing the Agilogy Way
Agile Software Testing the Agilogy WayAgile Software Testing the Agilogy Way
Agile Software Testing the Agilogy Way
 
A Software Testing Intro
A Software Testing IntroA Software Testing Intro
A Software Testing Intro
 
Software testing
Software testingSoftware testing
Software testing
 
Module V - Software Testing Strategies.pdf
Module V - Software Testing Strategies.pdfModule V - Software Testing Strategies.pdf
Module V - Software Testing Strategies.pdf
 
Manual Testing software testing all slide
Manual Testing software testing all slideManual Testing software testing all slide
Manual Testing software testing all slide
 
manualtesting-170218090020 (1).pdf
manualtesting-170218090020 (1).pdfmanualtesting-170218090020 (1).pdf
manualtesting-170218090020 (1).pdf
 
SOFTWARE TESTING W4_watermark.pdf
SOFTWARE TESTING W4_watermark.pdfSOFTWARE TESTING W4_watermark.pdf
SOFTWARE TESTING W4_watermark.pdf
 
Software testing & its technology
Software testing & its technologySoftware testing & its technology
Software testing & its technology
 

More from Taymoor Nazmy

Cognitive systems
Cognitive  systemsCognitive  systems
Cognitive systems
Taymoor Nazmy
 
Cognitive systems
Cognitive  systemsCognitive  systems
Cognitive systems
Taymoor Nazmy
 
Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logic
Taymoor Nazmy
 
Artificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-searchArtificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-search
Taymoor Nazmy
 
Lec 2-agents
Lec 2-agentsLec 2-agents
Lec 2-agents
Taymoor Nazmy
 
Artificial intelligent Lec 1-ai-introduction-
Artificial intelligent Lec 1-ai-introduction-Artificial intelligent Lec 1-ai-introduction-
Artificial intelligent Lec 1-ai-introduction-
Taymoor Nazmy
 
Image processing 2
Image processing 2Image processing 2
Image processing 2
Taymoor Nazmy
 
Image processing 1-lectures
Image processing  1-lecturesImage processing  1-lectures
Image processing 1-lectures
Taymoor Nazmy
 
Software Engineering Lec 8-design-
Software Engineering Lec 8-design-Software Engineering Lec 8-design-
Software Engineering Lec 8-design-
Taymoor Nazmy
 
Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-
Taymoor Nazmy
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-i
Taymoor Nazmy
 
Software Engineering Lec 4-requirments
Software Engineering Lec 4-requirmentsSoftware Engineering Lec 4-requirments
Software Engineering Lec 4-requirments
Taymoor Nazmy
 
Software Engineering Lec 3-project managment
Software Engineering Lec 3-project managmentSoftware Engineering Lec 3-project managment
Software Engineering Lec 3-project managment
Taymoor Nazmy
 
Software Engineering Lec 2
Software Engineering Lec 2Software Engineering Lec 2
Software Engineering Lec 2
Taymoor Nazmy
 
Software Engineering Lec 1-introduction
Software Engineering Lec 1-introductionSoftware Engineering Lec 1-introduction
Software Engineering Lec 1-introduction
Taymoor Nazmy
 
Lec 6-
Lec 6-Lec 6-
presentation skill
presentation skillpresentation skill
presentation skill
Taymoor Nazmy
 
Lec 4
Lec 4Lec 4
Lec 3
Lec 3Lec 3
Lec 2
Lec 2Lec 2

More from Taymoor Nazmy (20)

Cognitive systems
Cognitive  systemsCognitive  systems
Cognitive systems
 
Cognitive systems
Cognitive  systemsCognitive  systems
Cognitive systems
 
Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logic
 
Artificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-searchArtificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-search
 
Lec 2-agents
Lec 2-agentsLec 2-agents
Lec 2-agents
 
Artificial intelligent Lec 1-ai-introduction-
Artificial intelligent Lec 1-ai-introduction-Artificial intelligent Lec 1-ai-introduction-
Artificial intelligent Lec 1-ai-introduction-
 
Image processing 2
Image processing 2Image processing 2
Image processing 2
 
Image processing 1-lectures
Image processing  1-lecturesImage processing  1-lectures
Image processing 1-lectures
 
Software Engineering Lec 8-design-
Software Engineering Lec 8-design-Software Engineering Lec 8-design-
Software Engineering Lec 8-design-
 
Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-i
 
Software Engineering Lec 4-requirments
Software Engineering Lec 4-requirmentsSoftware Engineering Lec 4-requirments
Software Engineering Lec 4-requirments
 
Software Engineering Lec 3-project managment
Software Engineering Lec 3-project managmentSoftware Engineering Lec 3-project managment
Software Engineering Lec 3-project managment
 
Software Engineering Lec 2
Software Engineering Lec 2Software Engineering Lec 2
Software Engineering Lec 2
 
Software Engineering Lec 1-introduction
Software Engineering Lec 1-introductionSoftware Engineering Lec 1-introduction
Software Engineering Lec 1-introduction
 
Lec 6-
Lec 6-Lec 6-
Lec 6-
 
presentation skill
presentation skillpresentation skill
presentation skill
 
Lec 4
Lec 4Lec 4
Lec 4
 
Lec 3
Lec 3Lec 3
Lec 3
 
Lec 2
Lec 2Lec 2
Lec 2
 

Recently uploaded

ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 

Recently uploaded (20)

ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 

Software Engineering Lec 10 -software testing--

  • 1. 10- Verification and Validation
  • 2. • Assuring that a software system meets a user’s needs • Verification: • “Are we building the product right” – The software should conform to its specification. • Validation: • “Are we building the right product” – The software should do what the user really requires. Verification vs Validation
  • 3. • Is a whole life-cycle process - V & V must be applied at each stage in the software process. • Has two principal objectives: – The discovery of defects in a system. – The assessment of whether or not the system is usable in an operational situation. The V & V Process
  • 4. • Dynamic V & V Concerned with exercising and observing product behavior (testing). • Static verification Concerned with analysis of the static system representation to discover problems. Dynamic and Static Verification
  • 5. Static and Dynamic V&V Formal specification High-level design Requirements specification Detailed design Program Prototype Dynamic validation Static verification
  • 6.
  • 8. Testing – Terminology • Test case – Individual test • Test suite – Collection of test cases • Test harness – Program that executes a series of test cases • Test framework – Software that facilitates writing & running tests – Example – JUnit
  • 9. Testing – Terminology • Test driver – Program to create environment for running tests – Declares variables, creates objects, assigns values – Executes code and displays results of tests • Tester (Quality Assurance) – Person devising and / or performing tests – More effective if 2nd person writes tests • Walkthrough – Programmer explains code to 2nd person
  • 10. Types of Testing • Program testing can be used to show the presence of bugs, but never their absence.” • Static: Done without actually executing program – Code inspections – Walkthroughs • Dynamic: Done by executing program or its parts – Module or unit testing – Integration testing – System testing
  • 11. Who Tests the Software? developer independent tester Understands the system but, will test "gently" and, is driven by "delivery" Must learn about the system, but, will attempt to break it and, is driven by quality
  • 12. Testing Principles • All tests should be traceable to customer requirements. • Tests should be planned before testing begins. • 80% of all errors are in 20% of the code. • Testing should begin in the small and progress to the large. • Exhaustive testing is not possible. • Testing should be conducted by an independent third party if possible.
  • 13. Software Defect Causes • Specification may be wrong. • Specification may be a physical impossibility. • Faulty program design. • Program may be incorrect.
  • 14. Types of Errors • Algorithmic error. • Computation & precision error. • Documentation error. • Capacity error or boundary error. • Timing and coordination error. • Performance error. • Recovery error. • Hardware & system software error. • Standards & procedure errors.
  • 15. Test Strategies • Black-box or behavioral testing – knowing the specified function a product is to perform and demonstrating correct operation based solely on its specification without regard for its internal logic • White-box or glass-box testing – knowing the internal workings of a product, tests are performed to check the workings of all possible logic paths
  • 16. Black-box Testing • Focus: I/O behavior. If for any given input, we can predict the output, then the module passes the test. – Almost always impossible to generate all possible inputs ("test cases") • Goal: Reduce number of test cases by equivalence partitioning: – Divide input conditions into equivalence classes – Choose test cases for each equivalence class. (Example: If an object is supposed to accept a negative number, testing one negative number is enough)
  • 17. Black-box Testing (Continued) • Selection of equivalence classes (No rules, only guidelines): – Input is valid across range of values. Select test cases from 3 equivalence classes: • Below the range • Within the range • Above the range – Input is valid if it is from a discrete set. Select test cases from 2 equivalence classes: • Valid discrete value • Invalid discrete value • Another solution to select only a limited amount of test cases: – Get knowledge about the inner workings of the unit being tested => white-box testing
  • 18. White-box Testing • Focus: Thoroughness (Coverage). Every statement in the component is executed at least once. • Four types of white-box testing – Statement Testing – Loop Testing – Path Testing – Branch Testing
  • 19. White-box Testing (Continued) • Statement Testing (Algebraic Testing): Test single statements (Choice of operators in polynomials, etc) • Loop Testing: – Cause execution of the loop to be skipped completely. (Exception: Repeat loops) – Loop to be executed exactly once – Loop to be executed more than once • Path testing: – Make sure all paths in the program are executed • Branch Testing (Conditional Testing): Make sure that each possible outcome from a condition is tested at least once
  • 20. • Unit testing – testing of individual components • Module testing – testing of collections of dependent components • Sub-system testing – testing collections of modules integrated into sub-systems • System testing – testing the complete system prior to delivery • Acceptance testing – testing by users to check that the system satisfies requirements. Sometimes called alpha testing Testing Stages
  • 22. Unit Testing • Program reviews. • Formal verification. • Testing the program itself. – black box and white box testing.
  • 23. Types of Testing • Unit Testing: – Individual subsystem – Carried out by developers – Goal: Confirm that subsystems is correctly coded and carries out the intended functionality • Integration Testing: – Groups of subsystems (collection of classes) and eventually the entire system – Carried out by developers – Goal: Test the interface among the subsystem
  • 24. System Testing • System Testing: – The entire system – Carried out by developers – Goal: Determine if the system meets the requirements (functional and global) • Acceptance Testing: – Evaluates the system delivered by developers – Carried out by the client. May involve executing typical transactions on site on a trial basis – Goal: Demonstrate that the system meets customer requirements and is ready to use • Implementation (Coding) and testing go hand in hand
  • 25. Eaxample:Test Cases • Test case 1 : ? (To execute loop exactly once) • Test case 2 : ? (To skip loop body) • Test case 3: ?,? (to execute loop more than once) These 3 test cases cover all control flow paths
  • 26. Generating Test Data • Ideally want to test every permutation of valid and invalid inputs • Equivalence partitioning it often required to reduce to infinite test case sets – Every possible input belongs to one of the equivalence classes. – No input belongs to more than one class. – Each point is representative of class.
  • 27. Regression Testing • Check for defects propagated to other modules by changes made to existing program – Representative sample of existing test cases is used to exercise all software functions. – Additional test cases focusing software functions likely to be affected by the change. – Tests cases that focus on the changed software components.
  • 28. Integration Testing • Bottom - up testing (test harness). • Top - down testing (stubs). • Modified top - down testing - test levels independently. • Big Bang. • Sandwich testing.
  • 29. Top-Down Integration Testing • Main program used as a test driver and stubs are substitutes for components directly subordinate to it. • Subordinate stubs are replaced one at a time with real components (following the depth-first or breadth-first approach). • Tests are conducted as each component is integrated. • On completion of each set of tests and other stub is replaced with a real component. • Regression testing may be used to ensure that new errors not introduced.
  • 30. Bottom-Up Integration Testing • Low level components are combined in clusters that perform a specific software function. • A driver (control program) is written to coordinate test case input and output. • The cluster is tested. • Drivers are removed and clusters are combined moving upward in the program structure.
  • 31. Acceptance Testing • Making sure the software works correctly for intended user in his or her normal work environment. • Alpha test – version of the complete software is tested by customer under the supervision of the developer at the developer’s site • Beta test – version of the complete software is tested by customer at his or her own site without the developer being present
  • 32. System Testing • Recovery testing – checks system’s ability to recover from failures • Security testing – verifies that system protection mechanism prevents improper penetration or data alteration • Stress testing – program is checked to see how well it deals with abnormal resource demands • Performance testing – tests the run-time performance of software
  • 33. Performance Testing • Stress test. • Volume test. • Configuration test (hardware & software). • Compatibility. • Regression tests. • Security tests. • Timing tests. • Environmental tests. • Quality tests. • Recovery tests. • Maintenance tests. • Documentation tests. • Human factors tests.
  • 34. Testing Life Cycle • Establish test objectives. • Design criteria (review criteria). – Correct. – Feasible. – Coverage. – Demonstrate functionality . • Writing test cases. • Testing test cases. • Execute test cases. • Evaluate test results.
  • 35. Testing Tools • Simulators. • Monitors. • Analyzers. • Test data generators.
  • 36. Test Team Members • Professional testers. • Analysts. • System designers. • Configuration management specialists. • Users.
  • 37. Test Documentation Needed • Requirement being tested. • Design verification methodology. • Code verification methodology.
  • 38. Document Each Test Case • Requirement tested. • Facet / feature / path tested. • Person & date. • Tools & code needed. • Test data & instructions. • Expected results. • Actual test results & analysis • Correction, schedule, and signoff.
  • 39. Test Case Design "Bugs lurk in corners and congregate at boundaries ..." Boris Beizer OBJECTIVE CRITERIA CONSTRAINT to uncover errors in a complete manner with a minimum of effort and time
  • 40. Debugging • Debugging (removal of a defect) occurs as a consequence of successful testing. • Some people better at debugging than others. • Is the cause of the bug reproduced in another part of the program? • What “next bug” might be introduced by the fix that is being proposed? • What could have been done to prevent this bug in the first place?
  • 41. The Debugging Process Locate error Design error repair Repair error Re-test program
  • 42. Debugging Approaches • Brute force – memory dumps and run-time traces are examined for clues to error causes • Backtracking – source code is examined by looking backwards from symptom to potential causes of errors • Cause elimination – uses binary partitioning to reduce the number of locations potential where errors can exist