Automation Frameworks – Implement to Reap The Advantages

Automation TestingSoftware TestingTesting Tools

You can cross a busy road of the street just by rushing from one side to the other side without following any rules. But that can be dangerous for you, chances of you being hit by a car or any other vehicles are very high. But at the same time, if you follow the simple traffic rules to look both the sides of the road before crossing it can save you from falling victims of road accidents. Isn’t it?

Similarly, you can perform the automation testing without implementing any framework, just buy an automation tool and start doing the testing. That’s fine, no issues with that. But when you implement a perfect framework and follow its guidelines you will get the most required beneficial outcomes from it.

What is Framework?

Frameworks are a set of guidelines which can be ignored, but when that followed you will reap the benefits from it.


Frameworks consists of guidelines, concepts, best practices, established processes, well-defined coding standards, object repositories process, better handling of test data, proven reporting mechanism etc., to perfectly performing our work and get the better beneficial outcomes from it.

An automation framework provides us the required environment to create and execute our automation test scripts, better error handling, reduce script maintenance cost by organizing the automation scripts efficiently which can be reused when required.

What You Will Get from It?

Let’s discuss some of the benefits you will get by adopting a framework while automating our applications.

  • Frameworks reduces the manual efforts to a limit, works can be completed with minimal user intervention
  • It will reduce maintenance cost with effective project repositories
  • In case of any changes, instead of changing test scripts, only the test case file needs to be updated and the Driver Script and Start-up Script remain unchanged
  • Test data can be separately kept in excel or CSV files, no need to include them inside the test scripts. So in case of any modifications, we can simply manipulate the data in the excel file easily without changing the scripts
  • Common library files can be reused when required, no need to develop them every time. Thus it saves time of the team and improves the productivity
  • Apart from them, it also provides us the benefits of code re-usability, role-based access, easy reporting, consistency and maximum test coverage

Types of Frameworks

There are different types of frameworks having distinct guidelines to follow. We can adopt a framework based upon our requirements.

Module-Based Testing Framework

This framework focuses on module or functions based scripting. We need to write separate scripts for each of the module under test, and by integrating those scripts, we will get larger scripts for more than one module.

Advantages of this framework is, it avoids the inter dependencies of scripts. So, in case of any changes the script representing that module needs to be updated, leaving the other scripts untouched. Thus it provides stability and reduces rework cost.

The major issues with this framework is with the test data, as we embedded the test data into module wise scripts , so in case of data changes that script also required to be updated accordingly.

Common Library Testing Framework

As we know there are some common steps which can be used across the modules. We can write functions with those common steps and keep them in a shared library. So, when required we can call that function from the library instead of writing those common steps again.

For example, we can write a function with common steps required for logging an application and keep that in library. So, whenever similar login screen is required to be tested in the application, we can simply call that function.

The disadvantage of this framework is that, in case the shared function is wrongly written, then that have an cascading affect into other scripts as well.

Data-Driven Testing Framework

Let’s discuss a scenario; you are in an education domain project where you need to test large number of student data. So, it is obvious that you also need to add new data and drop some old data to test various scenarios.

In that case, isn’t it a tough job to insert those large student data in each scripts and again in case of changes, you need to edit all those scripts? Just imagine the amount of the work required to do all these activities.

That’s where the data driven framework comes to your rescue. Using the framework, we can store the test data in a separate excel, CSV or xml files, and later call them multiple times using the key by invoking calling function of shared library within the script.

While this framework increases flexibility and maintainability, complication of the process requires extra effort and expertise in programming language to create the scripts.

Keyword-Driven Testing Framework

This is an extension of the data driven framework, but it also stores the keywords along with certain set of codes in a table. So when those keywords, for example login, clickbutton, verifyLink etc., are required we can simply invoke them independently.

As the keywords and the test data are stored in a table, it is also called as Table driven Framework. This framework requires less scripting knowledge but to create the keyword mechanism requires programming knowledge.

Hybrid Testing Framework

This framework is a combination of two or more above mentioned frameworks to leverage the required benefits from them. You can adopt the combinations of Data-Driven framework with Keyword driven framework and if required, you can add the common library testing framework.

The sole purpose is to get the most desirable benefits by combining multiple frameworks.

Behavior Driven Development Framework

This framework focuses on developing and testing the business specifications using various tools like cucumber, jbehave etc., and following the continuous integration approach using Jenkins and Bamboo.

All the phases from writing stories, mapping and configuring, executing and viewing the reports, can be performed using various tools, hence not necessary to be an expert in programming language.

raja
Published on 20-Jan-2020 11:01:45
Advertisements