Test harness and test bed are crucial to the overall software development process. Software testing involves screening the code written by developers with a micro-analysis approach and present a macro view of the results generated from the test.
"All code is guilty until proven innocent"
Test harness is a technique that enables test automation. Test harness refers to the system test drivers and other tools that support test automation. The technique of test harness provides stubs and drivers that interact with software under test.
Why Test Harness:
Enables automating the test process.
Generating test reports for test cases.
Provides opportunity for debugging.
Recording test results for each automated test.
Helps developers to assess code coverage.
Automation definitely increases productivity of the system.
Enhancing quality of the components of an application.
Automation eases a lot of intricacies that testers often find difficulty in simulating.
Test harness can be applied in two types of scenario - automation and integration testing.
A test harness includes information required to compile and run test cases, source files under test, stubs, drivers etc.
A test execution environment configured specially for executing tests is known as a test bed. A test bed includes specific hardware, software, operating system, network configuration and other application. Therefore a test bed can be thought of as a balanced set up of hardware and software configuration.
A test bed is generally referred to as test environment. A test bed creates an opportunity for developers and testers to carry out their activities according to what they desire to achieve away from the live production environment.
Things need to be set up for Test Environment:
System as a whole comprising of the essential hardware and network configurations along with some other applications.
Data to be used during test execution.
The server to be used for database.
Environment set up for testing front end.
Configuring operating system used at client site that is needed for testing.
Browser installation to test cross browser compatibility.
Setting up the network configuration.
Documentation is needed for referencing. Some of the documents are installation guides, user manuals, configuration guides etc.
Process of test bed setup:
Test server set up: A test needs a server to run which supports an application under test. Each programming language requires different servers as each has its own mechanism. For instance, PHP requires setting up of Fedora, Java based applications require Apache Tomcat, Glassfish, Wildfly etc.
Network: Network configuration include LAN or VPN setup.
Desktop setup: Well, the most important thing is to set up the operating system, testing/developer tools, browsers, emulators to be used while testing mobile applications and so on.
Bug reporting: It includes tools used for executing test cases to find out bugs. The output is measured to evaluate whether there exist any bugs and to find out the underlying reason for the same.
Creating test data: Test data is the one that is provided as input into the system. While performing tests, testers use a replica of the actual data to be used in the production environment.
A tester can simply copy the production data to the test environment and utilise the same for testing or he may refer to the production data and apply his own knowledge and skills to build a similar set of data.