Test Automation Framework and its Types?

Automation testing framework is a conceptual definition of the protocol or processes that will be followed during the development and execution of test scripts. This includes structuring and utilising the modules, libraries, functions, reusable code and the underlying test data.

Below are the types of test automation frameworks-

  1. Linear Framework

Linear framework is also known as record and playback framework. Manually the test steps will be followed one by one for each test case by a record and playback tool.

•Every test case will be executed once, and there is no scope for reusability.
•If any data changes are required, it has to be done manually for the next run.
•Maintenance or enhancement of such record and playback scripts is a very difficult task.

  1. Module-driven Framework

Different functions of the application are identified and separate modules are designed for each function. Different developers may code different modules, which when integrated will cover the functionality of the whole application.

•Due to modular design, any change in any functionality can be accommodated easily in the corresponding module without causing any changes in the other modules.
•Enhancement and maintenance are easy.

  1. Behaviour-driven development framework

Behaviour-driven development (BDD) framework uses natural language for creating the scenarios and test cases. Hence, any one – business analyst, client, tester, developer can write and understand the BDD test cases.

•Requires expert level technical skills when BDD test cases are mapped and written at the automation testing script level.
•Helps in developing a collaborative environment between all the stakeholders, since anyone can understand the BDD level test cases.

  1. Data-driven Framework

Data-driven framework as the name suggests is driven by data. The test data and test scripts are kept separate with no dependency on each other. Different sets of data are run using the same test script.

•Data can be stored in excel file, CSV file, xml file, database table, accessed through a variable name in the test script.
•Provides a better test coverage, since a large variety of test data can be used in the files.
•Ideal for the scenarios where the same test case is run, with different data sets.
•Requires coding expertise for writing scripts, since external files will be accessed, read and written.

  1. Keyword-driven Framework

Keyword-driven framework is also known as table-driven framework. The keywords defining the actions are stored in a table and based on the keyword automation testing scripts are run.

•The keywords are application independent, hence can be used with multiple applications.
•Multiple modules can use the same keywords and then the subsequent testing scripts, hence this enhances reusability.
•To set up the initial test scripts and framework, expertise is required.
•Keyword-driven testing framework is feasible for smaller projects. Since in big projects, the number of keywords is large and the complexity increases.

  1. Hybrid Framework

In a hybrid framework, there is a combination of multiple frameworks and hence the name – Hybrid Framework.
Example is hybrid framework using both data-driven and keyword-driven framework.

•Based on the project requirement, budget, team expertise hybrid of any two or more frameworks can be used.
•It is judicious to use the hybrid framework, since the advantages of all the incorporated frameworks will be automatically reflected in the hybrid-framework.

#testautomation #bdd #testing #testingframework #softwaretesting #keyworddriven

1.35 GEEK