Glossary · Automation software engineering and architecture
Test harness
Also known as: Test framework, Test driver
German: Testumgebung
In software testing, a test harness is the collection of software, drivers, stubs and configuration used to run tests on a unit or system, supply inputs, capture outputs and compare them with expected results.
- Software engineering
In one sentence
A test harness is the software and configuration that runs tests, supplies inputs, captures outputs and compares them with expected results.
Example
The test harness for the drive firmware loads each test case, sends commands over the fieldbus simulator, records the responses and writes a test report.
How it applies
- Engineering: A harness makes tests automated and repeatable. For PLC code, unit test frameworks run inside the engineering environment or runtime; for systems, harnesses drive simulations or real hardware.
- Functional safety: When test results serve as safety evidence, the harness is a tool whose correctness matters; its version and configuration should be recorded.
- Documentation: Document how to set up and run the harness, so tests can be repeated by others and for later releases.
Test harness vs. test environment
The German list term Testumgebung usually translates as test environment, which also includes hardware, networks and data. A test harness is the part of it that executes and evaluates tests.