Observations about Testing
“Testing is the process of executing a
program with the intention of finding errors.” – Myers
“Testing can show the presence of bugs but never their absence.” - Dijkstra
Good Testing Practices
A good test case is one that has a high
probability of detecting an undiscovered defect, not one that shows that the program works correctly
It is impossible to test your own program
A necessary part of every test case is a description of the expected result
Good Testing Practices
(cont’d)
Avoid nonreproducible or on-the-fly testing
Write test cases for valid as well as invalid
input conditions.
Thoroughly inspect the results of each test
As the number of detected defects in a piece of software increases, the probability of the existence of more undetected defects also increases
Good Testing Practices
(cont’d)
Assign your best people to testing
Ensure that testability is a key objective
in your software design
Never alter the program to make testing easier Testing, like almost every other activity, must start with objectives
Levels of Testing
Unit Testing
Integration Testing
Validation Testing
Regression Testing
Alpha Testing
Beta Testing
Acceptance Testing
Unit Testing
Algorithms and logic
Data structures (global and local)
Interfaces
Independent paths
Boundary conditions
Error handling
Why Integration Testing Is
Necessary
One module can have an adverse effect
on another
Subfunctions, when combined, may not produce the desired major function
Individually acceptable imprecision in calculations may be magnified to unacceptable levels
Why Integration Testing Is
Necessary (cont’d)
Interfacing errors not detected in unit
testing may appear
Timing problems (in real-time systems) are not detectable by unit testing
Resource contention problems are not detectable by unit testing
Top-Down Integration
1.
2.
The main control module is used as a
driver,