Test harness

from Wikipedia, the free encyclopedia

In the quality assurance of software called a test harness (engl. Test harness ) and test frame is a collection of software and test data , which is used for systematic automated testing of a program under various environmental conditions. Both the behavior and the output of the software are monitored and evaluated.

General

A test harness consists of two main components: the test execution engine, which is responsible for processing the test logic, and the test data repository, which contains the test scripts, test programs and other test resources. As a rule, the test scripts created are very much adapted to the respective environment to be tested and can therefore only be reused to a limited extent in other areas.

The creation of a test harness is used for test automation , since it allows all (or at least most) program functions to be carried out without user interaction. The results are output and compared with default values ​​to determine the test result. A test harness is often implemented using a test automation framework - such as B. STAF or TPT - created. Such frameworks offer the possibility, for example, of running tests in parallel on different systems or setting up the test environment independently if necessary by performing predefined actions (e.g. copying tests to all computers in the test environment ).

Web development

In web development, small web applications are used as test harnesses that simulate different error scenarios of REST or SOAP interfaces depending on the port number used .

Examples
  • Successful request with HTTP status code 200 and valid data
  • Response with HTTP status code 200 and invalid data
  • Response with invalid HTTP headers
  • Response with high latency or timeout
  • Request for a port that returns a specific HTTP status code (e.g. status code 301 on port 20301)
  • Request for port with invalid SSL or TLS certificate
  • Request to IP address or port without service

aims

  • Automation of the test process
  • Execution of test suites and test cases
  • Generation of test reports

advantages

  • Increased productivity through reduced need for person-hours per test cycle
  • Simplify running regression tests on a regular basis
  • Improved quality of software components and applications

swell

  1. Software Testing Automation Framework (STAF)
  2. Official website of PikeTec and TPT
  3. Michael T. Nygard: Release It! Design and Deploy Production-Ready Software. O'Reilly, 2007, ISBN 978-0-9787392-1-8 (English, 326 pages).