Loading

Test Automation Frameworks


Why 'Automation' ..!!

The thought might have flashed across the minds of many people who are indulging in the field of information technology, or those who are already an adept in this industry. The epicentre of dilemma lies in the fact that how relevant automation is and to what extent it may offer a feasible solution to a given scenario.

Well, automation testing has its own set of merits and demerits. Automation definitely eases the task of testing as one can break an application into separate modules and test each of them. This simplifies the task of analysing the results and identify potential errors arising thereof.

Considering the usage of any automation tool, it is sometimes difficult to comprehend the extent of simplicity or the degree of complexity involved in it, at an initial stage. However the point at which we may conclude resorting to automation testing is the fact that it saves time and effort of the testers as the scripts or the lines of code executes the functionality thus offering the benefit of code coverage.

Let us now look at the various types of automation 'frameworks':

  • Module based testing framework - Module based testing derives its existence from the concept of 'abstraction'. Abstraction is one of the key concepts of OOP’s (Object Oriented Programming). The modular framework divides an application to be tested, into different modules each having individual test scripts. Any changes made in one of the modules does not hinder the working of any other module.

    Such a framework offers a considerable number of benefits like easy and cost efficient maintenance, scalability, and non-interference of one module with another.

  • Library architecture testing framework - In this framework, instead of modules, the application is divided into common functions or libraries. These libraries are called through the test scripts when required. For instance, the sequence of steps for logging into a site can be saved under a single library so that when there is a need to execute the steps, it can be invoked from a single source.
  • Data driven testing framework - This framework deals with testing an application with the help of different set of input values. This results in different test outputs at various point of times. Thus it is advisable to store the test data in some external database.

    Data driven testing enables segregation of test scripts and test data. Test data can be saved in any external data source - text files, xml files, CSV files, excel sheets etc. Generally, the test data is stored in "key-value" format.

  • Keyword driven testing framework - In keyword driven testing, keywords refer to the actions words that defines which functionality is to be invoked. It is also termed as 'table-driven testing' as the keywords are stored in tabular format. Keywords are the words that are self explanatory in nature, that is, it conveys the actions need to be performed. Eg. Robot Framework.
  • Hybrid testing framework - Hybrid framework comprises of a blend of the aforementioned frameworks. It integrates the features of the various frameworks thus offering an advantage over any specific framework.
  • Behaviour driven development framework - It can be concluded from the name of the framework that it conveys something about the behaviour or functionality of a given application program. The user need not be well versed with programming language to understand what is being done by this framework. Various tools that offer BDD feature are quite a few, namely, Cucumber, Jbehave, Serenity.

Advantages of test automation framework:

  1. Code is reusable.
  2. Offers maximum code coverage.
  3. Recovery is easier.
  4. Maintenance cost is low.
  5. Manual interference is least required.
  6. Error reporting becomes simple.