A test automation framework consists of a set of assumptions, concepts and tools that provide support for automated software testing. The main advantage of such a framework is the low cost for maintenance. If there is change to any test case then only the test case file needs to be updated. However the Driver Script and Startup script will remain the same.
Choosing the right framework/scripting technique helps in maintaining lower costs. The costs associated with test scripting are due to development and maintenance efforts. The approach of scripting used during test automation has effect on costs.
Various Framework/scripting techniques are generally used:
- Linear (procedural code, possibly generated by tools like those that use record and playback)
- Structured (uses control structures - typically ‘if-else’, ‘switch’, ‘for’, ‘while’ conditions/ statements)
- Data-driven (data is persisted outside of tests in a database, spreadsheet, or other mechanism)
- Hybrid (two or more of the above patterns are used)
The Testing framework is responsible for:
- Defining the format in which to express expectations.
- Creating a mechanism to hook into or drive the application under test.
- Executing the tests.
- Reporting results.