Hubbry Logo
search button
Sign in
Test harness
Test harness
Comunity Hub
History
arrow-down
starMore
arrow-down
bob

Bob

Have a question related to this hub?

bob

Alice

Got something to say related to this hub?
Share it here.

#general is a chat channel to discuss anything related to the hub.
Hubbry Logo
search button
Sign in
Test harness
Community hub for the Wikipedia article
logoWikipedian hub
Welcome to the community hub built on top of the Test harness Wikipedia article. Here, you can discuss, collect, and organize anything related to Test harness. The purpose of the hub is to connect people,...
Add your contribution
Test harness

In software testing, a test harness is a collection of stubs and drivers configured to assist with the testing of an application or component.[1][2] It acts as imitation infrastructure for test environments or containers where the full infrastructure is either not available or not desired.

Test harnesses allow for the automation of tests. They can call functions with supplied parameters and print out and compare the results to the desired value. The test harness provides a hook for the developed code, which can be tested using an automation framework.

A test harness is used to facilitate testing where all or some of an application's production infrastructure is unavailable, this may be due to licensing costs, security concerns meaning test environments are air gapped, resource limitations, or simply to increase the execution speed of tests by providing pre-defined test data and smaller software components instead of calculated data from full applications.

These individual objectives may be fulfilled by unit test framework tools, stubs or drivers.[3]

Example

[edit]

When attempting to build an application that needs to interface with an application on a mainframe computer, but no mainframe is available during development, a test harness may be built to use as a substitute this can mean that normally complex operations can be handled with a small amount of resources by providing pre-defined data and responses so the calculations performed by the mainframe are not needed.

A test harness may be part of a project deliverable. It may be kept separate from the application source code and may be reused on multiple projects. A test harness simulates application functionality; it has no knowledge of test suites, test cases or test reports. Those things are provided by a testing framework and associated automated testing tools.

A part of its job is to set up suitable test fixtures.

The test harness will generally be specific to a development environment such as Java. However, interoperability test harnesses have been developed for use in more complex systems.[4]

References

[edit]
  1. ^ "Test Harness". ISTQB Glossary. Retrieved 10 September 2023.
  2. ^ Rocha, Camila Ribeiro; Martins, Eliane (2008). "A Method for Model Based Test Harness Generation for Component Testing". Journal of the Brazilian Computer Society. 14: 8. doi:10.1007/BF03192549. Retrieved 10 September 2023.
  3. ^ ISTQB Exam Certification - "What is Test harness/ Unit test framework tools in software testing?", accessed 19 October 2015
  4. ^ Ricardo Jardim-Gonçalves, Jörg Müller, Kai Mertins, Martin Zelm, editors, Enterprise Interoperability II: New Challenges and Approaches, Springer, 2007, p. 674, accessed 19 October 2015

Further reading

[edit]
  • Pekka Abrahamsson, Michele Marchesi, Frank Maurer, Agile Processes in Software Engineering and Extreme Programming, Springer, 1 January 2009