Académique Documents
Professionnel Documents
Culture Documents
Software Quality
22
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University
Software Testing Motivation
33
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University
Software Testing Motivation
44
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University
Software Testing Motivation
55
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University
Software Testing Motivation
66
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University
What is Software Testing?
77
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University
What is Software Testing?
Related to event
Defect, Fault, Bug Accident
Incident, Issue
Risk = likelihood of failure
x impact
Failure
Risk
Simply any thing find by tester its defect,
when the developer accepts the defect its
bug. Any thing found faulty i.e. fault is an
Summary
error.
12
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 12
Trivial Example
Failure
return x*2;
} Fault
13
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 13
Trivial Example
Correct Result
return x*2;
}
14
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 14
Testing...Definition Revisited
Myers
Testing is the process of executing a program with
intention of finding errors
Paul Jorgensen
Testing is obviously concerned with errors, faults,
failures and incidents. A test is the act of exercising
software with test cases with an objective of Finding
failure and Demonstrate correct execution
ISO
Technical operation that consist of the determination of
one or more characteristics of a given product, process
or service according to a specified procedure
15
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 15
Verification and Validation
• Validation
– does the software do what was wanted?
– “Are we building the right system?”
– Validation is the process of evaluating software artifacts during the software
development process in an attempt to determine if the system works as
required by the customers.
– Verification
– does the software meet its specification?
– “Are we building the System right??”
– This can only be objective if the specifications are sufficiently precise
Validation
Main purpose is to show that the
20
20
Quality Assurance vs.
Quality Control
Quality Assurance Quality Control
A series of
An overall
analytical
management plan to
measurements used
guarantee the
to assess the
integrity of data
quality of the
(The “system”)
analytical data
(The “tools”)
Direct Objectives
To identify and reveal as many errors as
possible in the tested software
To bring the tested software, after correction
of the identified errors and retesting to an
acceptable level of quality
To perform the required tests efficiency and
effectively, within budgetary and scheduling
limitation
22
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 22
Indirect Objective
To compile a record of software errors for use
in error prevention (by corrective and
preventive actions)
23
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 23
Goals of Testing
• Goal: show a program meets its
specification
– But: testing can never be complete for non-
trivial programs
• What is a successful test?
– One in which no errors were found?
– One in which one or more errors were
found?
Goals of Testing - 2
• Testing should be:
– repeatable
– if you find an error, you want to repeat the test to
show others
– if you correct an error, you want to repeat the test to
check that you fixed it
– systematic
– random testing is not enough
– select test sets that are representative of real uses
– select test sets that cover the range of behaviors of
the program
– documented
– keep track of what tests were performed, and what
the results were
Goals of Testing - 3.
• Therefore you need a way to document
test cases showing:
– the input
– the expected output
– the actual result
• These test plans/scripts are critical to
project success!
Why do Failure Occur?
27
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 27
Root Causes of Failures
28
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 28
Failure Costs
29
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 29
Software Testers
30
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 30
31
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 31
Software Quality Factors
● Correctness
– accuracy, completeness of required
output
– uptodateness, availability of the
information
● Reliability
– maximum failure rate
● Efficiency
– resources needed to perform software function
● Integrity
– software system security, access rights
● Usability
– ability to learn, perform required task
32
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 32
Software Quality Factors…….
● Maintainability
– effort to identify and fix software failures (modularity,
documentation, etc)
● Flexibility
– degree of adaptability (to new customers, tasks, etc)
● Testability
– support for testing (e.g. log files, automatic diagnostics,
etc)
33
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 33
Software Quality Factors…….
● Portability
– adaptation to other environments (hardware,
software)
● Reusability
– use of software components for other projects
● Interoperability
– ability to interface with other
components/systems
34
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 34
Software Testing proverbs
35
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 35
proverb 1
It is impossible to test a program
completely
How many test cases do you need to exhaustively test:
Powerpoint
A calculator
MS Word
Any interesting software!
The only way to be absolutely sure software works is to
run it against all possible inputs and observe all of its
outputs …
Oh, and the specification must be correct and complete.
36
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 36
proverb 1 (cont’d)
It is impossible to test a program
completely
The number of possible inputs is very large.
The number of possible outputs is very
large.
The number of paths through the software is
very large.
The software specification open to
interpretation.
37
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 37
proverb 2
Software testing is a risk-based exercise
If you do not test the software for all inputs (a wise
choice) you take a risk.
Hopefully you will skip a lot of inputs that work
correctly.
What if you skip inputs that cause a fault?
Risk: financial loss, security, loss of money, loss of life!
That is a lot of pressure for a tester!
This course is all about techniques and practices to
help reduce the risk without breaking the bank.
38
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 38
proverb 2 (cont’d)
Software testing is a risk-based exercise
Number of Cost of
If you try to test too Missed Bugs Testing
much, the
development cost Q
becomes prohibitive. u
Testing
a Under Equilibrium
If you test too little, n
t
Testing Over
the probability of i
Testing
software failure t
y
increases and as we
discussed … software
failures can cost us
big time! Amount of Testing
39
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 39
proverb 3
Testing cannot show the absence of bugs
40
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 40
proverb 4
The more bugs you find, the more bugs there
are
Bugs appear in groups, where you see one you will likely find more
… Why?
Programmers can have bad days
Programmers tend to make the same mistakes
Some bugs are just the tip of the iceberg.
41
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 41
proverb 5
Not all bugs found will be fixed
Why wouldn’t you fix a bug you knew about?
There’s not enough time
● Some deadlines cannot be extended (e.g., Y2K)
It’s not really a bug
● Specifications can be wrong
It’s too risky to fix
● “I’m not touching Shahryarzzzz code!”
It’s just not worth it
● Bugs in fringe features may have to wait
● Why not charge the customer for bug fixes in the next release
(sound familiar?) :-)
42
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 42
proverb 6
It is difficult to say when a bug is indeed a bug
43
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 43
proverb 7
Specifications are never final
44
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 44
proverb 8
Software testers are not the most popular
members of a project
Goal of a software tester:
Find bugs
Find bugs early
Make sure bugs get fixed
45
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 45
proverb 9
Software testing is a disciplined and technical
profession
When software was simpler and more manageable software
testers were often untrained and testing was not done
methodically.
Contrary to the urban legend, if you hire a million monkeys and have them
test for a million years … you will not find all of the bugs in your software.
46
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 46
Key Points
47
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 47
You now know …
… the 9 proverbs of software testing
… what is software verification
… what is software validation
… the relationship between software quality and
reliability
… the relationship between Quality Control and quality
assurance or Software Testing and Software Quality
Priority and Severity of Defect.
48
© Syed Raheel Abbas- Delivered at Mohammad Ali Jinnah University 48