Skip to content

9618 · 12.3

Program Testing and Maintenance

Program testing is the systematic process of finding errors in software before it reaches the user. Effective testing involves using a variety of data to check that the program behaves as expected in all situations.

Need to know

What you need to know

  • **Black-Box Testing:** You test the program's functionality based solely on its specification. You provide inputs and check if the outputs are correct, without any knowledge of the internal code. This is what an end-user or a dedicated tester would do.
  • **White-Box Testing:** You test the program's internal logic and structure. You have access to the source code and design tests to ensure that every line of code and every possible path is executed. This is typically done by the developer.

Explanation

Testing: Finding the Faults

  1. Create a Test Plan: Decide what you need to test and what the correct outcome should be for each test.
  2. Select Test Data: Choose a range of data, including normal, boundary, and abnormal values, to challenge your program.
  3. Execute and Record: Run the tests and carefully document the actual results, comparing them to your expected outcomes.
  4. Maintain and Improve: Fix any identified bugs (corrective maintenance) and re-run tests to ensure stability.