Software Testing Part I
Thinking in Software Testing
Saroj Sangphongamphai, August 2015
ss.saroj@gmail.com
Sincerely grateful to all
teachers, professors, books,
websites, and others.
Think Big, Set the High Goal
Software development life cycle

Analysis and design

Planing

Implementation

Testing

Deployment
What is software testing?
1.Testing is the process of demonstrating that errors
are not present.
2.The purpose of testing is to show that a program
performs its intended functions correctly.
3.Testing is the process of establishing confidence
that a program does what it is supposed to do.
What is software testing?
Testing is the process of executing a
program with the intent of finding
errors.
Terms for software failures
Defect
Fault
Problem
Error
Incident
Anomaly
Variance
Failure
Inconsistency
Feature
Bug
Etc.
Software bug: a formal definition
(1 of 5)
The software does not do something that
the product specification says it should
do.
Software bug: a formal definition
(2 of 5)
The software does something that the
product specification says it should not
do.
Software bug: a formal definition
(3 of 5)
The software does something that the
product specification does not mention.
Software bug: a formal definition
(4 of 5)
The software does not do something that
the product specification does not
mention but should.
Software bug: a formal definition
(5 of 5)
The software is difficult to understand,
hard to use, slow, or in the software
tester’s eyes will be viewed by the end
user as just plain not right.
Software bug: a formal definition
1.The software does not do something that the product specification says
it should do.
2.The software does something that the product specification says it
should not do.
3.The software does something that the product specification does not
mention.
4.The software does not do something that the product specification does
not mention but should.
5.The software is difficult to understand, hard to use, slow, or in the
software tester’s eyes will be viewed by the end user as just plain not
right.
Insights from a Venn Diagram
Insights from a Venn Diagram
Why do bug occurs?
The cost of bugs
 To find bugs
 To find them as early as possible
 And to make sure they get fixed
The goal of a software tester
The challenge of software testing
Exhaustive testing is impractical.
Exhaustive testing is impractical
A simple function adds two 32 bit numbers and returns a result.
Assumption: we can execute 1,000 test cases per second
How long will it take to exhaustively test this function?
(Signed range 32 bits integer is -2,147,483,648 to 2,147,483,647 and unsigned: 0 to 4,294,967,295)
Exhaustive testing is impractical
A simple function adds two 32 bit numbers and returns a result.
Assumption: we can execute 1,000 test cases per second
How long will it take to exhaustively test this function?
Answer: 585 million years
2 (32+32)
/1000/60/60/24/365 = 584,942,417 years.
(Signed range 32 bits integer is -2,147,483,648 to 2,147,483,647 and unsigned: 0 to 4,294,967,295)
Optimal amount of testing
The psychology of software testing
A successful test case is one that
detects an undiscovered error.
The psychology of software testing
The psychology of software testing
Testing can only show the presence of
errors, not their absence.
The psychology of software testing
A necessary part of a test case is a
definition of the expected output or
result.
The difference between testing and
debugging
Testing = Find Bug
Debugging = Remove Bug
Quality is free
Early testing, more prevention than
detection
Quality is not equal to test
If it is not built right in the first place,
then it is never going to be right.
Quality is not equal to test
Quality is achieved by putting development and testing into a blender
and mixing them until one is indistinguishable from the other.
Primary metric
Cycle time
Reference
Question & Answer
Next
Software Testing Part II
Testing Techniques

Thinking in software testing

  • 1.
    Software Testing PartI Thinking in Software Testing Saroj Sangphongamphai, August 2015 ss.saroj@gmail.com
  • 2.
    Sincerely grateful toall teachers, professors, books, websites, and others.
  • 3.
    Think Big, Setthe High Goal
  • 8.
    Software development lifecycle  Analysis and design  Planing  Implementation  Testing  Deployment
  • 9.
    What is softwaretesting? 1.Testing is the process of demonstrating that errors are not present. 2.The purpose of testing is to show that a program performs its intended functions correctly. 3.Testing is the process of establishing confidence that a program does what it is supposed to do.
  • 10.
    What is softwaretesting? Testing is the process of executing a program with the intent of finding errors.
  • 11.
    Terms for softwarefailures Defect Fault Problem Error Incident Anomaly Variance Failure Inconsistency Feature Bug Etc.
  • 12.
    Software bug: aformal definition (1 of 5) The software does not do something that the product specification says it should do.
  • 13.
    Software bug: aformal definition (2 of 5) The software does something that the product specification says it should not do.
  • 14.
    Software bug: aformal definition (3 of 5) The software does something that the product specification does not mention.
  • 15.
    Software bug: aformal definition (4 of 5) The software does not do something that the product specification does not mention but should.
  • 16.
    Software bug: aformal definition (5 of 5) The software is difficult to understand, hard to use, slow, or in the software tester’s eyes will be viewed by the end user as just plain not right.
  • 17.
    Software bug: aformal definition 1.The software does not do something that the product specification says it should do. 2.The software does something that the product specification says it should not do. 3.The software does something that the product specification does not mention. 4.The software does not do something that the product specification does not mention but should. 5.The software is difficult to understand, hard to use, slow, or in the software tester’s eyes will be viewed by the end user as just plain not right.
  • 18.
    Insights from aVenn Diagram
  • 19.
    Insights from aVenn Diagram
  • 20.
    Why do bugoccurs?
  • 21.
  • 22.
     To findbugs  To find them as early as possible  And to make sure they get fixed The goal of a software tester
  • 23.
    The challenge ofsoftware testing Exhaustive testing is impractical.
  • 24.
    Exhaustive testing isimpractical A simple function adds two 32 bit numbers and returns a result. Assumption: we can execute 1,000 test cases per second How long will it take to exhaustively test this function? (Signed range 32 bits integer is -2,147,483,648 to 2,147,483,647 and unsigned: 0 to 4,294,967,295)
  • 25.
    Exhaustive testing isimpractical A simple function adds two 32 bit numbers and returns a result. Assumption: we can execute 1,000 test cases per second How long will it take to exhaustively test this function? Answer: 585 million years 2 (32+32) /1000/60/60/24/365 = 584,942,417 years. (Signed range 32 bits integer is -2,147,483,648 to 2,147,483,647 and unsigned: 0 to 4,294,967,295)
  • 26.
  • 27.
    The psychology ofsoftware testing A successful test case is one that detects an undiscovered error.
  • 28.
    The psychology ofsoftware testing
  • 29.
    The psychology ofsoftware testing Testing can only show the presence of errors, not their absence.
  • 30.
    The psychology ofsoftware testing A necessary part of a test case is a definition of the expected output or result.
  • 31.
    The difference betweentesting and debugging Testing = Find Bug Debugging = Remove Bug
  • 32.
  • 33.
    Early testing, moreprevention than detection
  • 34.
    Quality is notequal to test If it is not built right in the first place, then it is never going to be right.
  • 35.
    Quality is notequal to test Quality is achieved by putting development and testing into a blender and mixing them until one is indistinguishable from the other.
  • 36.
  • 37.
  • 38.
  • 39.
    Next Software Testing PartII Testing Techniques