Testing Programs (OCR GCSE Computer Science): Revision Notes
📚 Revision Notes
Testing Programmes
Testing is the process of ensuring that a programme functions correctly and meets its requirements. Testing helps identify and fix errors, ensuring the programme performs as intended. The goal of testing is to improve the programme's reliability, usability, and performance.
The Purpose of Testing
- Ensure functionality: Testing checks that the programme works as expected and performs its intended tasks.
- Identify and fix errors: It helps uncover bugs and logic errors that may not be obvious during development.
- Meet requirements: Ensures that the final product satisfies the original requirements and user needs.
Types of Testing
Iterative Testing
- Performed during development, testing individual modules or parts of the programme as they are written.
- Involves continuously testing, identifying issues, and fixing them immediately.
- Allows for early detection of errors and prevents them from compounding as the project progresses.
- Developers test the programme in cycles, repeatedly making improvements until the programme meets the requirements. Example: Writing a subroutine and then testing it immediately to ensure it works before moving on to the next part of the programme.
Final/Terminal Testing
- Conducted after the entire program has been written and development is complete.
- Tests the programme as a whole to ensure it meets all initial requirements.
- It focuses on ensuring the final product behaves as expected in all scenarios, fixing any remaining bugs before release.
- This type of testing ensures the programme is ready for deployment. Example: Testing the entire application to verify that it handles all expected and edge-case inputs correctly before releasing it to users.
Differences Between Iterative and Final Testing
| Iterative Testing | Final Testing |
|---|---|
| Performed during development | Performed after development is complete |
| Involves testing smaller parts or modules of the programme | Involves testing the entire programme as a whole |
| Fixing errors and making improvements as you go | Fixes errors that occur in the final version before deployment |
| Allows for continuous refinement | Ensures the product is ready for end users |
infoNote
Key Points to Remember
- Iterative testing helps catch and fix issues early, during development, while final testing ensures the entire programme works correctly after development.
- Both types of testing are crucial for delivering a reliable, error-free programme.
- Testing ensures that the programme meets the original specifications and performs correctly under different conditions.