词条 | Test harness |
释义 |
In software testing, a test harness or automated test framework is a collection of software and test data configured to test a program unit by running it under varying conditions and monitoring its behavior and outputs. It has two main parts: the test execution engine and the test script repository. 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 is a hook to the developed code, which can be tested using an automation framework. A test harness should allow specific tests to run (this helps in optimizing), orchestrate a runtime environment, and provide a capability to analyse results. The typical objectives of a test harness are to:
These individual objectives may be fulfilled by unit test framework tools, stubs or drivers.[1] A test harness may provide some of the following benefits:
Alternative definitionAn alternative definition of a test harness is software constructed to facilitate integration testing. Where test stubs are typically components of the application under development and are replaced by working components as the application is developed (top-down integration testing), test harnesses are external to the application being tested and simulate services or functionality not available in a test environment. For example, 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. A test harness may be part of a project deliverable. It is 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.[2] References1. ^ISTQB Exam Certification - "What is Test harness/ Unit test framework tools in software testing?", accessed 19 October 2015 2. ^Ricardo Jardim-Gonçalves, Jörg Müller, Kai Mertins, Martin Zelm, editors, [https://books.google.com/books?id=JZRDvNC78ZcC&pg=PA650&lpg=PA650&dq=interoperability+test+harness&source=bl&ots=o48FDE0adT&sig=xb4tLcq0tWdOBq9vU6FPJsNeaSE&hl=en&sa=X&ved=0CEAQ6AEwBWoVChMI7u-z6ILOyAIVAmkUCh2s5A7n#v=onepage&q=%5B3%5D&f=false Enterprise Interoperability II: New Challenges and Approaches], Springer, 2007, p. 674, accessed 19 October 2015 Further reading
1 : Software testing |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。