Tải bản đầy đủ (.pdf) (62 trang)

Introduction to software testing potx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (441.55 KB, 62 trang )

Introduction to
software testing
2
Contents
 Definitions, Principles, Axioms
 Stages of testing
 Perspectives on Software Testing
 A little math (Part 1)
3
Definitions, Principles, Axioms
4
Definitions
 Testing
 Verification
 Validation
 Error/Defect
 Black box testing
 White box testing
5
Definitions of Testing (1)
 The process of executing a program (or part
of a program) with the intention of finding
errors (Myers, Humphrey)
 The purpose of testing is to find errors.
Testing is the process of trying to discover
every conceivable fault or weakness in a
work product (Myers, Kit)
 The process of searching for errors (Kaner)
6
Definitions of Testing (2)
 Testing – the process of finding errors and of


validating the program/system (Jorgensen)
 The purpose of software testing is to find
errors and to get them fixed (Bitzenhofer)
 The purpose of software testing is to reduce
risk (E&M)
7
Verification and Validation:
Myers
 Verification: An attempt to find errors by
executing a program in a test or simulated
environment
 Validation: An attempt to find errors by
executing a program in a real environment
8
Verification and Validation: IEEE
 Verification: The process of evaluating a
system or component to determine whether
the products…satisfy the conditions
imposed…
 Validation: The process of evaluating a
system or component…to determine whether
it satisfies specified requirements.
9
Verification and Validation:
Kaner
 Verification: Checking a program against the
most closely related design documents or
specifications (“Design Verification Testing”)
 Validation: Checking the program against the
published user or system requirements

(“System Validation Testing”)
10
Software Fault Terminology
 Error – a mistake in design, coding,
requirements, even testing
 Fault (defect) – the representation of the error
 Failure – what happens when the fault
“executes”
11
Software Fault Terminology:
Examples
 Error
 A wrong loop index
 Programmer-to-device pointer error
 Fault – the representation of the error
 A loop executes one too many times
 A programmed parameter gets written to the wrong address
 Failure – what happens when the fault “executes”
 A table overflows; memory gets overwritten
 The physician only thinks he/she changed that heart parameter
12
Black and White Box
 Black box testing
 Designed without knowledge of the program‟s
internal structure and design
 Based on functional requirements
 Also called Functional Testing
 White box testing
 Examines the internal design of the program
 Requires detailed knowledge of its structure

 Also called Structural Testing
13
Six Essentials of Software
Testing (1)
1.The quality of the test process determines the
success of the test effort.
2.Prevent defect migration by using early life-
cycle testing techniques.
3.The time for software testing tools is now.
Adapted from Software Testing in the Real World, Edward Kit; Addison-
Wesley, 1995
14
Six Essentials of Software
Testing (2)
4.A real person must take responsibility for
improving the testing process.
5.Testing is a professional discipline requiring
trained, skilled people.
6.Cultivate a positive team attitude of creative
destruction.
Adapted from Software Testing in the Real World, Edward Kit; Addison-
Wesley, 1995
15
Some Principles and Axioms
of Testing (1)
 “Program testing can be used to show the
presence of bugs, but never their absence.”
(Dijkstra, 1969)
 One of the most difficult problems in testing is
knowing when to stop.

 It is impossible to test your own program.
16
Some Principles and Axioms
of Testing (2)
 As the number of detected defects in a piece
of software increases, the probability of the
existence of more undetected defects also
increases.
 “Testing is an extremely creative and
intellectually challenging task” (Myers again)
 Exhaustive testing is impossible.
17
Stages of testing
18
The Test Process
 Requirements phase
 Planning phase
 Design and development phase
 Execution phase
 Reporting phase
19
Software Test Execution
Stages
 Unit Test
 Design Verification Test (DVT)
 Interface, Integration, Exit/Formal
 System Validation Test (SVT)
 Main, Regression, Acceptance
 Customer Acceptance Test
20

Unit Test
 Performed by the developers
 White-box testing
 Should be done with each release to testing
 Results should be communicated to the Test
Group
21
Typical Entry Criteria (Unit
Test)
 Module compiles successfully (no errors,
approved warnings)
 Unit Test Plan complete
 Unit Test Cases complete
 Tools are available
22
Typical Unit Test Activities
 Source level debugging if it won‟t compile
 Design and review the Unit Test cases
 Track test defects (maybe)
 Measure Unit Test coverage
 Make sure it builds
23
Typical Exit Criteria (Unit Test)
 All tests attempted
 99% of the tests executed successfully
 85% statement coverage
 Test cases have been stored under
Configuration Management
24
Software Test Stages

 Unit Test
 Design Verification Test
 Interface, Integration, Exit/Formal Test Phase
 System Validation Test
 Main, Regression, Acceptance
 Customer Acceptance Test
25
Design Verification Test (DVT)
 Performed by the test organization
 Black box testing
 Verification of engineering requirements
 Verification of the software design

×