Introduction To Software Testing Why Do We Test Software?: Cs 300 Software Engineering Week 14
Introduction To Software Testing Why Do We Test Software?: Cs 300 Software Engineering Week 14
Testing
3
Software Faults, Errors & Failures
Software Fault : A static defect in the software
4
Fault and Failure Example
A patient gives a doctor a list of symptoms
– Failures
The doctor tries to diagnose the root cause, the
ailment
– Fault
The doctor may look for anomalous internal
conditions (high blood pressure, irregular heartbeat,
bacteria in the blood stream)
– Errors
Most medical problems result from external attacks
(bacteria, viruses) or physical degradation as we age.
Software faults were there at the beginning and do
not “appear” when a part wears out.
5
A Concrete Example
Fault: Should start
searching at 0, not 1
6
The Term Bug
Bug is used informally
Sometimes speakers mean fault, sometimes error, sometimes
failure … often the speaker doesn’t know what it means !
This class will try to use words that have precise, defined, and
unambiguous meanings
7
Spectacular Software Failures
NASA’s Mars lander: September 1999, THERAC-25 design
crashed due to a units integration fault
Mars Polar
Lander crash
site?
8
Northeast Blackout of 2003
508 generating
units and 256
power plants shut
down
Affected 10 million
people in Ontario,
Canada
Affected 40 million
people in 8 US
states
Financial losses of
$6 Billion USD
13
What Does This Mean?
14
Validation & Verification (IEEE)
15
Testing Goals Based on Test
Process Maturity
Level 0 : There’s no difference between testing and
debugging
Level 1 : The purpose of testing is to show
correctness
Level 2 : The purpose of testing is to show that the
software doesn’t work
Level 3 : The purpose of testing is not to prove
anything specific, but to reduce the risk of using the
software
Level 4 : Testing is a mental discipline that helps all
IT professionals develop higher quality software
16
Level 0 Thinking
Testing is the same as debugging
17
Level 1 Thinking
Purpose is to show correctness
Correctness is impossible to achieve
What do we know if no failures?
– Good software or bad tests?
Test engineers have no:
– Strict goal
– Real stopping rule
– Formal test technique
– Test managers are powerless
18
Level 2 Thinking
Purpose is to show failures
Puts
testers and developers into an
adversarial relationship
19
Level 3 Thinking
Testing can only show the presence of failures
Whenever we use software, we incur some
risk
Risk may be small and consequences
unimportant
Risk may be great and consequences
catastrophic
Testers and developers cooperate to reduce
risk
21
Where Are You?
23
Here! Test This!
Offutt’s first “professional” job
Big software– big
MicroSteff program
software system
for the mac
V.1.5.1 Jan/2007
Jan/2011
1.44 MB
MF2-HD
DataLife
Verdatim
25
Cost of Not Testing
Poor Program Managers might say:
“Testing is too expensive.”
26
Cost of Late Testing
60
Assume $1000 unit cost, per fault, 100 faults
50
40
Fault origin (%)
30
Fault detection (%)
20
Unit cost (X)
10
0
• Improve quality
• Reduce cost
• Preserve customer satisfaction
28
Software
Testing Life
Cycle
(STLC)
STLC with QA
Software Testing Life Cycle is a sequence of activities conducted during testing process
to ensure software quality goals are met.
There are 6 major phases in STLC model:
Requirement
Analysis
Test Planning Test Case
PROCESSEnvironment
Development OF STLC MODEL
Setup Test
Execution
Test Closure
Requirement Analysis
QA interacts with various stakeholders like Client,
Business Analyst, System Analyst, Technical Lead/
Development Manager to understand the requirements in
detail to develop the project.
During this phase the QA takes an important decisions like
what are the testing types & techniques to be performed,
feasibility for automation testing implementation, etc.
Test Planning
It is a document which contains the plan related to all testing
activities which needs to be done to deliver a quality product.
Senior QA Manager determines test plan strategy along with
efforts and cost estimates for the project.
The focus of the is to describe: