However, if we produce a software product without Testing may lead to cost potentially much higher than of testing “Life Critical System”, economics must not be the prime consideration
Trang 1Software Testing
Trang 2What is Testing?
Testing is the process of demonstrating that errors are
not present
The purpose of testing is to show that a program
performs its intended functions correctly
Testing is the process of establishing confidence that a
program does what it is suppose to do.
These definitions are incorrect.
Why???
“Testing is the process of executing a program with the intent
of finding errors”
Trang 3Why should We Test?
Although Software Testing is an expensive activity However, if we produce a software product without Testing may lead to cost potentially much higher than of testing
“Life Critical System”, economics must not be the prime consideration while deciding whether a product should be released to a customer.
In commercial system it is often difficult to estimate the cost of errors.
Trang 4Who should Do the Testing?
It is very difficult for software developer to point out
errors from own creations(Why?)
Testing persons are different from Development persons
for the overall benefit of the system
Developers provide guide lines during testing
Whole responsibility is owned by Testing persons
Trang 5What should We Test?
It is not possible to test the software for all possible
combination of input cases (example)
It is impossible to execute all path the program (example)
Complete Testing is impossible, although we may wish
to do so
Organizations should develop strategies and policies
for choosing effective testing techniques
Trang 6Error, Mistake, Bug, Fault and Failure
Error: People make errors A good synonym is MISTAKE
Mistakes during coding is called Bug
Fault: An error may lead to one or more faults Fault is
the representation of error Defect is a good synonym for fault
Failure: occurs when a fault executes One fault may lead
to many Failures
Trang 7Test, Test Case, Test Suite
A Test: is the act of exercising software with test cases
There are two distinct goals of a test: either to find failures, or to demonstrate correct execution
Trang 8Test, Test Case, Test Suite
Test Case: Describes an input description and an
expected output description (example)
A Good Test Case has high probability of finding an error
The main objective of Test Case Designer is to identify good test cases
Test Suite: the set of test cases Any combination of test
cases may generate a Test Suite
Trang 9Verification and Validation
Verification: the process of conforming that software
meets its specification (Checking the software with respect to specification)
Validation: the process of conforming that software
meets the customer’s requirements (Checking the software with respect to customer’s expectation)
If there is a gap at RSR level that will only be know
during validation activities
Poor understand of expectation may lead to incorrect
specifications
Trang 10Alpha, Beta and Acceptance Testing
Alpha and Beta Testing: used when the software
developed as a product for anonymous customers
Alpha tests are conducted at developer’s site by customer
This test may be stared when formal testing process near completion
Beta tests are conducted by the customers/end users at their site Beta testing is conducted in a real environment that cannot be control by the developer.
Trang 11Alpha, Beta and Acceptance Testing
Acceptance Testing: used when the software is developed
for a specific customer
A series of test are conducted to enable the customer to
validate all requirements These test are conducted by the
end user/customer
Trang 12Example 1
A program requires two 8 bit integers as
inputs, so total possible combinations are:
28 x 28
If one second is required to execute one set
of inputs, it will take 18 hours
Trang 13Example 2
Suppose we have a program which uses loop and If statement as following:
The number of paths in
the example is 1014
If only 1 minute is require
to test one path, it may
take 1/5 billion years
to execute all path
<=20 times