Introduction to
Software Testing
Knowledge Level:
Basic
About the Author
Created By: Testing Services
Version and INTROTOTESTING/PPT/0904/1.0
Date:
©Copyright 2004, Cognizant Academy, All Rights Reserved 2
Icons used
Questions References
Key Concepts Demo
Brain Teasers A Welcome Break
©Copyright 2004, Cognizant Academy, All Rights Reserved 3
Courseware Information
Course This Module deals with the fundamentals of Software
Description Testing, an important part of Software Development.
Level Entry Level Trainees
Prerequisites
©Copyright 2004, Cognizant Academy, All Rights Reserved 4
Course Objective & Outline
Course Objective:
After completing this course, you will understand about place of Quality in Software
development, Software Testing Life Cycle and gain some Project Experience.
Course Flow:
2.
1.
All about
About Quality
Testing
©Copyright 2004, Cognizant Academy, All Rights Reserved 5
1.0 About Quality
Introduction:
The topic introduces you to the place of Quality in Software Development
and highlights its importance towards ensuring a high quality product
Objective:
After completing this topic, you will be able to,
– Understand the concept of Quality
©Copyright 2004, Cognizant Academy, All Rights Reserved 6
What is Quality ?
“The degree to which a system, component or process meets requirements”
or
“The degree to which a system, component or process meets customer or
user needs or expectations”
-I.E.E.E.
©Copyright 2004, Cognizant Academy, All Rights Reserved 7
Quality is…
• What the customer says it is…
– Features
– Cost
– Time
• Not a goal, but a means for continuous improvement
©Copyright 2004, Cognizant Academy, All Rights Reserved 8
Dimensions of Software Quality
• Functionality
– Completeness
– Correctness
– Compatibility
• Performance
– Time
– Resources
• Maintainability
– Correctability
– Expandability
– Testability
©Copyright 2004, Cognizant Academy, All Rights Reserved 9
Dimensions of Software Quality
• Portability
– Hardware independence
– Interoperability
• Reliability
– Error tolerance
– Availability
• Usability
– Understandability
– Learnability
– Operability
– Communicativeness
©Copyright 2004, Cognizant Academy, All Rights Reserved 10
The Quality Aspect
• QA & QC
– QUALITY ASSURANCE measures the quality of processes used to create a
quality product.
– QUALITY CONTROL measures the quality of a product
QA QC
Prevention-based Detection-based
Process-based Product-oriented
Organisation level Producers responsibility
Phase building activity End of phase activity
©Copyright 2004, Cognizant Academy, All Rights Reserved 11
2.0 All About Testing
Introduction:
The topic introduces you to the concept of testing , its importance in Quality
assurance and its various techniques
Objective:
After completing this topic, you will be able to,
– Understand the concept of Testing
©Copyright 2004, Cognizant Academy, All Rights Reserved 12
Testing – What Is it ???
• A process of demonstrating that errors are not present ?
OR
• A way of establishing confidence that a program does what it is
supposed to do ?
OR
• A means of achieving an error-free program by finding all errors ?
©Copyright 2004, Cognizant Academy, All Rights Reserved 13
Testing Vs Debugging
Testing Debugging
Validates the functionality A code-walk through
of the application done during compilation.
It doesn't validate the
functionality of the
application
Carried out without Carried out only after
knowing where & whether encountering a trouble in
a problem exists in the the application
application
A planned & scheduled Cannot be planned and
activity scheduled
More of a system More of a code
perspective perspective
14
The Testing Profession
Perhaps it needs courage to accept ones fault,but it needs extra courage
to find fault and prove it too!
Software Testing is not just finding fault. It is a Planned and Scheduled
Process which helps in making Quality Products
©Copyright 2004, Cognizant Academy, All Rights Reserved 15
Significance of Testing
Some instances to tell the significance of Software Testing
“…it might be due to a very tiny hole in the heart but…Can you afford to
loose your life for that?
Errors , however small they might be ,cannot be excused in this competitive
world…some instances”
• In early 2000,major problems were reported with a new computer
system in a large suburban US public school with 100,000+
students;problems included 10000 erroneous report cards and students
left stranded by failed class registration systems;the CIO was fired!
• A small town in Illinois received an unusually large monthly electric bill of
$7 million which is about 700 times larger than its normal bill.It turned
out to be due to bugs in new software that had been purchased by the
local power company to deal with Y2K software issues!
16
Software Quality Issues
Challenges Problem Symptoms
• Scope creep/churning • User or business needs not met
requirements
• Fuzzy requirements • Poor end-user experience
• Lack of skilled resources • Difficult-to-maintain systems
• Lack of a most suitable process • Build-and-release issues
• Flaws in Design • Modules don’t integrate
• Incomplete test planning • Poor performance under load
• Late Testing • Flaws discovered very late
• Unreliable data for testing
• Improper defect tracking • Defect Leakage
©Copyright 2004, Cognizant Academy, All Rights Reserved 17
Importance of the “Third Eye”
Why Outsource Testing
• Independent and Unbiased Assessment
• Time and Cost Savings
• Focus
• Controlled Environment
• Second level of validation
©Copyright 2004, Cognizant Academy, All Rights Reserved 18
Testing – It is…
• A process of executing a program with the intent of finding errors
• A “DESTRUCTIVE”, yet creative process
©Copyright 2004, Cognizant Academy, All Rights Reserved 19
Why Testing?
• Verifies that all requirements are implemented correctly (both for
positive and negative conditions)
• Identifies defects before software deployment
• Helps improve quality and reliability.
• Makes software predictable in behavior.
• Reduces incompatibility and interoperability issues.
• Helps marketability and retention of customers.
©Copyright 2004, Cognizant Academy, All Rights Reserved 20
Cost of Ineffective Testing
• Time
– Late Releases
– Projects need to be reworked or abandoned
• Money
– Budget over-runs
– Defects are 100 to 1000 times more costly to find and repair after deployment
• Quality
– Developers unsure of product quality
– Products released with undiscovered or unresolved defects
©Copyright 2004, Cognizant Academy, All Rights Reserved 21
What is Testing
• The process of execution of the application under test with the intent of
finding errors
©Copyright 2004, Cognizant Academy, All Rights Reserved 22
Why Testing?
• Cost of Failure associated with defective products getting shipped and
used by customer is enormous
• To find out whether the integrated product work as per the customer
requirements
• To evaluate the product with an independent perspective
• To identify as many defects as possible before the customer finds
• To reduce the risk of releasing the product
23
Avoid Rework
• The Cost of Correction
REQMTS DESIGN CODING TESTING PRODN
©Copyright 2004, Cognizant Academy, All Rights Reserved 24
Source of Defects
10%
7% Other
Code
Requirements
Design
56%
27%
Source: “Software Testing in the Real World”
- Edward Kit, 1995
©Copyright 2004, Cognizant Academy, All Rights Reserved 25
Testing Lifecycle
Development Lifecycle Iteration n
Project Requirements Analysis Implementation
Planning Capture & Design
Build Build Build
0 1 2
Test Lifecycle
Execute
Plan Design Setup
Test
Test Test Test Bed
Evaluate
Test
Defect Tracking/Enhancement Request
©Copyright 2004, Cognizant Academy, All Rights Reserved 26
Testing Lifecycle
Requirements
Capture
The Scenarios Design and the Test Case
Development could normally start in
Analysis parallel with the Development Cycle.
Test Execution Synchs up with the
Development Cycle during the functional
Test planning & Testing Phases
Scenario Design
New Version Test Case
Development
Defect Fixing
Test Execution
Cycle
Test Cycle
Defects
Closure
Test Result
Analysis
©Copyright 2004, Cognizant Academy, All Rights Reserved 27
Points of Verification
• Totals, balances, computations
• Data displays
• Error messages
©Copyright 2004, Cognizant Academy, All Rights Reserved 28
Test Automation
• Good candidates:
– Complex and time-consuming tests
– Tests requiring a great deal of precision
– Tests involving many simple, repetitive tests
– Tests involving many data combinations
• Lower priority candidates:
– One-time only tests
– Testing peripheral devices
– Subjective assessment tests (look and feel based)
©Copyright 2004, Cognizant Academy, All Rights Reserved 29
Testing Principles
• Plan and test to find errors and NOT to prove that the program
works fine.
• Be creative and have an attitude to HACK / BREAK.
• Run tests independently and impartially.
• All tests should be traceable to the requirements
• Plan long before you actually commence testing
• Exhaustive/complete testing is not feasible, so optimize tests
based on priority and criticality
• Test Early and Iteratively as it evolves
©Copyright 2004, Cognizant Academy, All Rights Reserved 30
Testing Principles
• “Divide and Conquer” – Begin “in the small” and progress towards
testing “in the large”
• Pareto principle holds true - The 80-20 rule
• More the errors found already, it’s more likely to find more errors
• If 2 tests should return the same result, one is not needed.
• Automate tests, wherever feasible
• Create reusable test artifacts/scenarios.
• Fix only when a test cycle is completed
©Copyright 2004, Cognizant Academy, All Rights Reserved 31
©Copyright 2004, Cognizant Academy, All Rights Reserved 32
Congratulations!
Congratulations!
You
You have
have successfully
successfully
completed
completed
Introduction to
Software Testing