Software Testing Fundamentals
Software Testing Fundamentals
Software testing:
“The Process of executing a program with the intent
of finding errors”
(Myers)
2
Software testing:
3
Software testing:
“The process of analyzing a software item to detect the
differences between existing and required conditions
(that is, bugs) and to evaluate the features of the
software item.”
4
Testing is not easy!
• Takes time, must be scheduled
5
Testing – Debugging Cycle
Software Delivery
No Error
Software Debugging
Testing cost!
7
Why do we spend so much?
• Why is the testing being done?
• Find failures (not faults!)
• Certification
• Safety: criticality
• Usability
• Performance
• Acceptance
• Load
• Compatibility
• Security
8
Testing Activities
1. Test planning and design
2. Verification of test plans, designs and cases
3. Test case selection, creation and verification
4. Planning expected results
5. Data preparation
6. Execution and recording of results
7. Analysis of results
8. Wrap-up
9
Software Testing Life Cycle:
10
What to test?
• Any part of a system can be tested
• choice of part constrains choices in other dimensions
12
Who should do the testing?
13
Skills of a Tester:
• Not all testers are developers
• e.g. testers at Corel who are photographers (Corel
Draw testing - end user testing).
• e.g. testing buddies at Microsoft.
• Testers may also be developers.
• Some testers may need specialized domain knowledge
related to the application area.
14
Skills of a Tester:
• Testers must have
• ability to select good test cases
• ability to withstand the most severe deadline and
resource pressures
• ability to organize and analyze large volumes of data
• ability to sort out complex version control issues
15
•Inexperienced testers often fail to report:
• timing problems
• transient bugs
• what they can’t quickly replicate
• what they think can be attributable to their
misunderstanding
• what they think the reader of the report might consider
minor
• lots of other problems
16
Test Case:
“A test case is a scenario to be executed with the intention of
finding a particular error/defect.”
“Inputs to test the system and the predicted outputs from these
inputs if the system operates according to its specification.”
17
A good test case:
• A good test case:
• has a high probability of finding an error
• is not redundant
• should be “best of breed”
• should be neither too simple nor too complex
18
Successful Test:
• A test which causes a program to behave in an anomalous
way, is said to be a successful test case.
19
Testing Principles:
1. All tests should be traceable to customer requirements.
2. Tests should be planned long before testing begins.
3. The Pareto principle applies to software testing.
4. Testing should begin “in the small” and progress toward testing
“in the large”.
5. Exhaustive Testing is not possible.
6. To be most effective, testing should be conducted by an
independent third party.
20
Pareto Principle:
“80% of all the errors uncovered during testing will
likely to be traceable to 20% of all the program
components.”
21
Parts of a test case:
22
23
Test plan:
24
Test report:
25
When to stop testing?
• How is the decision to stop testing made?
• Coverage
• Limits set by management
• User acceptance e.g. Early adopters
• Contractual
CLUCREFAME
• Reliability threshold
• Fault detection rate threshold
• Meeting a standard
26
References:
27
Thank You!