Chapter 18 - Software Testing Strategies

Overview

This chapter describes several approaches to testing software. Software testing must be planned carefully to avoid wasting development time and resources. Testing begins "in the small" and progresses "to the large". Initially individual components are tested using white box and black box techniques. After the individual components have been tested and added to the system, integration testing takes place. Once the full software product is completed, system testing is performed. The Test Specification document should be reviewed like all other software engineering work products. A sample Test Specification document appears on the SEPA web site.

 

Strategic Approach to Software Testing

 

Strategic Testing Issues

 

Unit Testing

 

Integration Testing

  1. Main control module used as a test driver and stubs are substitutes for components directly subordinate to it.
  2. Subordinate stubs are replaced one at a time with real components (following the depth-first or breadth-first approach).
  3. Tests are conducted as each component is integrated.
  4. On completion of each set of tests and other stub is replaced with a real component.
  5. Regression testing may be used to ensure that new errors not introduced.
  1. Low level components are combined in clusters that perform a specific software function.
  2. A driver (control program) is written to coordinate test case input and output.
  3. The cluster is tested.
  4. Drivers are removed and clusters are combined moving upward in the program structure.
  1. Representative sample of existing test cases is used to exercise all software functions.
  2. Additional test cases focusing software functions likely to be affected by the change.
  3. Tests cases that focus on the changed software components.
  1. Software components already translated into code are integrated into a build.
  2. A series of tests designed to expose errors that will keep the build from performing its functions are created.
  3. The build is integrated with the other builds and the entire product is smoke tested daily (either top-down or bottom integration may be used).

 

General Software Test Criteria

 

Validation Testing

Acceptance Testing

System Testing

Debugging

  1. Brute force (memory dumps and run-time traces are examined for clues to error causes)
  2. Backtracking (source code is examined by looking backwards from symptom to potential causes of errors)
  3. Cause elimination (uses binary partitioning to reduce the number of locations potential where errors can exist)

Bug Removal Considerations