The Importance of Testing Before Deployment
Testing a system before it is deployed is vital to ensure it operates as intended and meets all specified requirements. Without thorough testing, errors may remain undetected, leading to system failures, data loss, or security breaches when the system is in use. Early detection of faults reduces the cost and effort of fixing problems compared to post-deployment corrections. Testing also verifies that the system handles all expected inputs and conditions correctly, providing confidence to users and stakeholders.
- Prevents costly errors after deployment.
- Ensures system meets functional and non-functional requirements.
- Improves reliability and user satisfaction.
Designing Test Plans and Strategies
A test plan is a structured document that outlines how testing will be conducted. It includes the test data to be used, the expected results for each test, the actual results obtained, and any corrective actions if discrepancies arise. Effective test plans cover all parts of the system, from individual modules and functions to the integrated whole. Testing strategies may involve unit testing (testing individual components), integration testing (testing combined modules), and system testing (testing the complete system). Each strategy targets different levels of the system to ensure comprehensive coverage.
- Test plans specify test data, expected and actual results, corrective actions.
- Testing strategies include unit, integration, and system testing.
- Systematic approach ensures all components and interactions are tested.
Testing Data Structures, File Structures, Input and Output Formats, and Validation Routines
Testing must verify that data structures (such as arrays, lists, or records) and file structures (such as sequential or indexed files) are correctly implemented and manipulated. Input formats need to be checked to ensure the system accepts valid data and rejects invalid formats. Output formats must be tested to confirm that data is presented correctly to users or other systems. Validation routines, which check data correctness and completeness, are critical to prevent errors from propagating through the system. For example, a validation routine might check that a date input is in the correct format and within a valid range.
- Verify correct handling of data and file structures.
- Check input acceptance and rejection criteria.
- Confirm output formatting meets requirements.
- Test validation routines to catch incorrect or incomplete data.
Types of Test Data and Their Roles
Test data is the input used to exercise the system during testing. It is categorised into:
Normal data: Typical, valid inputs expected during regular use. For example, entering a valid date like 15/06/2024.
Abnormal data: Invalid or unexpected inputs designed to test error handling, such as entering letters where numbers are required or a date like 31/02/2024 which does not exist. - Extreme data: Boundary values at the edges of acceptable input ranges, such as the earliest or latest possible date allowed by the system (e.g., 01/01/1900 or 31/12/2099). Testing these helps ensure the system handles limits correctly. - Live data: Real data collected from actual system use, which can reveal issues not anticipated by artificial test data. Using live data helps validate system performance in real-world conditions.
- Normal data tests typical valid inputs.
- Abnormal data tests invalid or unexpected inputs.
- Extreme data tests boundary conditions.
- Live data tests real-world system behaviour.
Executing Tests and Taking Corrective Actions
During testing, each test case is executed by inputting the test data and observing the system's output. The actual results are compared against the expected results documented in the test plan. If the actual results differ, this indicates a fault that must be investigated and corrected. Corrective actions may involve debugging code, fixing data handling errors, or improving validation routines. After corrections, tests should be repeated to confirm the issue is resolved. This iterative process continues until the system passes all tests, ensuring readiness for deployment.
- Run test cases using planned test data.
- Compare actual results to expected results.
- Identify and correct faults found.
- Retest to confirm fixes are effective.
At-a-glance summary
Comparison table
| Step | Detail | Example | Exam Use |
|---|---|---|---|
| Designing Test Plans | Create documents specifying test data, expected results, actual results, corrective actions | Plan to test login module with valid and invalid usernames | Explain how test plans ensure systematic testing |
| Testing Modules and Functions | Test individual parts before integrating | Test a function that calculates discounts separately | Describe benefits of unit testing |
| Testing Data Structures and Files | Verify correct data storage and retrieval | Check that a customer record is saved and loaded correctly | Identify errors in file handling |
| Using Different Test Data | Apply normal, abnormal, extreme, and live data | Test input of age with 25 (normal), -5 (abnormal), 150 (extreme) | Justify use of boundary values in testing |
| Corrective Actions | Fix errors found during testing and retest | Correct validation routine rejecting valid emails | Explain importance of retesting after fixes |
Active recall
Quick check
1. What is the purpose of including expected results in a test plan?
To provide a benchmark to compare actual results against, helping identify if the system behaves correctly.
2. Give an example of abnormal test data for a date input.
Entering 31/02/2024, which is an invalid date that should be rejected by the system.
3. Why is it important to test validation routines?
Because they ensure only correct and complete data is accepted, preventing errors downstream.
4. What testing strategy focuses on checking individual functions or modules?
Unit testing, which isolates components to verify they work correctly on their own.
5. How does using extreme data help in testing?
It checks that the system correctly handles boundary values, preventing errors at input limits.
