Test bench
This article needs additional citations for verification. (January 2013) |
A test bench or testing workbench is an (often virtual) environment used to verify the correctness or soundness of a design or model, for example, that of a software product.
The term has its roots in the testing of electronic devices, where an engineer would sit at a lab bench with tools for measurement and manipulation, such as oscilloscopes, multimeters, soldering irons, wire cutters, and so on, and manually verify the correctness of the device under test (DUT).
In the context of software or firmware or hardware engineering, a test bench refers to an environment in which the product under development is tested with the aid of software and hardware tools. The suite of testing tools is often designed specifically for the product under test. The software may need to be modified slightly in some cases to work with the test bench but careful coding can ensure that the changes can be undone easily and without introducing bugs. [1]
Components of a test bench
A test bench has four components:
- Input: The entrance criteria and requirement needed to perform work
- Output: The exit criteria or deliverables produced from the workbench
- Procedures to : The tasks or processes that will transform the input into the output
- Procedures to check: The processes that determine that the output meets the standards
Kinds of test benches
The following types of test bench are the most common:
- Stimulus only — Contains only the stimulus driver and DUT; does not contain any results verification.
- Full test bench — Contains stimulus driver, known good results, and results comparison.
- Simulator specific — The test bench is written in a simulator-specific format.
- Hybrid test bench — Combines techniques from more than one test bench style.
- Fast test bench — Test bench written to get ultimate speed from simulation.
An example of a software test bench
The tools used to automate the testing process in a test bench perform the following functions:
- Test manager
- Manages the running of program tests; keeps track of test data, expected results and program facilities tested.
- Test data generator
- Generates test data for the program to be tested.
- Oracle
- Generates predictions of the expected test results; the oracle may be either previous program versions or prototype systems. Note that this is not Oracle Corporation, the database company.
- File comparator
- Compares the results of the program tests with previous test results and records any differences in a document.
- Report generator
- Provides report definition and generation facilities for the test results.
- Dynamic analyzer
- Adds code to a program to count the number of times each statement has been executed. It generates an execution profile for the statements to show the number of times they are executed in the program run.
- Simulator
- Simulates the testing environment where the software product is to be used.