Cambridge A-Level Computer Science 9618 – 12.3 Program Testing and Maintenance
12.3 Program Testing and Maintenance
Learning Objective
Show understanding of the methods of testing available and select appropriate data for a given method.
1. Why Test?
Testing aims to discover faults, verify that the program meets its specifications, and provide confidence that future changes will not introduce new errors. It is a crucial part of the software development life‑cycle and continues into the maintenance phase.
2. Types of Testing
Unit (Component) Testing – tests individual modules or functions in isolation.
Integration Testing – checks interactions between combined units.
System Testing – validates the complete, integrated system against requirements.
Acceptance Testing – performed by the client or end‑user to confirm the system is fit for purpose.
Regression Testing – re‑runs previously successful tests after changes to ensure no new faults appear.
Maintenance Testing – testing performed during corrective, adaptive, perfective or preventive maintenance.
3. Testing Approaches
Black‑Box (Functional) Testing
Focuses on inputs and expected outputs.
Test design based on specifications, not on internal code.
White‑Box (Structural) Testing
Uses knowledge of the program’s internal structure.
Common techniques: statement coverage, branch coverage, path coverage.
Grey‑Box Testing
Combines black‑box and white‑box techniques.
Testers have limited knowledge of internal design.
4. Test Data Selection Techniques
Technique
Purpose
Typical Data Chosen
Equivalence Partitioning
Divide input domain into classes that are expected to behave similarly.
One representative value from each valid and invalid class.
Boundary \cdot alue Analysis
Test values at the edges of equivalence classes where errors are most likely.