Software Testing

Testing with a Purpose
Software testing is performed to verify that the completed software package functions according to the expectations defined by the requirements/specifications. The overall objective to not to find every software bug that exists, but to uncover situations that could negatively impact the customer, usability and/or maintainability.

From the module level to the application level, this article defines the different types of testing. Depending upon the purpose for testing and the software requirements/specs, a combination of testing methodologies is applied. One of the most overlooked areas of testing is regression testing and fault tolerant testing.

Definition of Testing Types

Functional Testing
Module testing verifies that individual software unit performs as expected according to the requirements using a small subset of possible input parameters. At the application level, testing verifies that the entire application functions together according to the requirements. Example:

  • Passing in real world parameters as well as valid but unusual parameters.

Parametric Testing
At the module level, testing verifies that individual software unit performs as expected according to the requirements for the full range of valid input parameters. Example:

  • Passing in each parameter at its minimum, maximum and median values, as well as passing in parameters at the minimum and maximum values at the same time.

Fault Tolerant Testing
Module testing verifies that individual software unit does not perform in a detrimental or unexpected manner for illegal or out-of-range input parameters. At the application level, testing verifies that the entire application functions together in a graceful manner according to the requirements when presented with unexpected and/or out-of-range values. Example:

  • Passing null pointers and the full range of possible values for each parameter.

Integration Testing
Integration testing is an additional step that is used when different sub-systems are being developed simultaneously by independent developers. It verifies that the parameters passed between sub-systems are being handled correctly. Example:

  • Passing null pointers and the full range of possible values for each parameter.

Regression Testing
Regression testing is retesting sub-systems/modules/units to insure that modifications to one sub-system/module/unit does not cause unexpected results in another sub-system/module/unit. This is also known as ripple effect testing.

Why is Regression Testing Necessary?
Regression testing is necessary because many times modifications in one part of the code cause unexpected problems in a "totally unrelated" area of the code.

Example scenario:
A video driver was released for the Diamond Stealth video board. Complaints started to come in that HP InkJet drivers were crashing when doing a print preview. It was discovered that the print preview functionality calls the video board's font rasterizing functions to generate the print preview.

A bug in the video boards font rasterizing function was causing a memory fault when called by the HP print driver. This caused the error to appear like it was in the printer driver and not the video driver.

Summary
Testing allows developers to deliver software that meets expectations, prevents unexpected results, and improves the long term maintenance of the application. Depending upon the purpose of testing and the software requirements, the appropriate methodologies are applied. Where possible, testing can be automated (a topic for another discusssion).