Test Automation Frameworks - Follow The Recipe Or Freestyle It?

Posted by Phil Edwards on 30/01/2018
Phil Edwards
Find me on:

For all those budding chefs out there, the question will always be, do you follow a recipe for your meal or do you make it up as you go along? Now, creative and seasoned chefs will throw in the ingredients to produce delightful food, however for us less talented would-be-cooks, our results will be vastly different, and that’s the point. To get predicable results you’ll need to follow a process (recipe) to gain the greatest chance of success - just like adopting an automation test framework.

Test Automation Frameworks follow the recipe or freestyle it.jpg
Following a comprehensive set of guidelines will produce beneficial results and the same applies to automation. Creating an automation framework that will be followed time and time again will bring predictable results, these guidelines may include the common test tool used, coding standards and expected outcomes.

Those of you already working in the testing arena will know that test automation frameworks are an essential part of any successful automated testing process. Not only can they reduce maintenance costs and testing efforts, but they will also provide a greater return on investment for testing teams, whether they are working in agile or waterfall projects.

Using an automation framework for testing will increase the team’s ability to deliver more for less and improve the predictability of the test outcome, whilst lowering the risk of manual error. Additionally, time to market will be decreased leading to reduced test cycles and less testing costs.

As you can imagine, there are many different types of test automation frameworks, each with their own benefits. However, it’s important to choose the framework that is right for your project. The four most common frameworks in use are as follows…

Linear Automation Framework is a record-and-playback framework, as you can imagine the testers don’t need to write code to create tests as the tester records each step such as the navigation, user input, and checkpoints, then plays the script back automatically to conduct the test.

The major benefits of using a Linear Framework is that there is no need to write code, so you don’t need to be an automation expert to automate the tests. This is one of the fastest ways to generate test scripts since they can be easily recorded in a minimal amount of time.

Modular Based Testing Framework, as the title suggests, is to set-up automation in a modular way by dividing the application under test into separate units, functions, or sections, each of which will be tested in isolation.

The benefits of a Modular Framework are that any changes that are made to the application, only the associated unit/module test script will need to be modified, thus meaning you won’t have to modify the rest of the test scripts, which takes less effort because test scripts for different modules can be reused.

Data-Driven Framework is the type of framework that separates the test data from the test script logic, which means the testers store the test data externally. Test data is called upon when required and can be maintain separately from the tests themselves. With this method it is critical that the test data isn’t hard-coded in the test script itself, which is what happens with a Linear or Modular-based testing framework.

The benefit of a Data-Driven Framework is that ultimately, tests can be executed with multiple data sets and that multiple test scenarios can be tested quickly by varying the data, thereby reducing the number of scripts needed.

In a Keyword-Driven Framework, each function of the application under test is put into a table with a series of instructions in consecutive order for each test that needs to be run (think Excel).

The key benefit of Keyword-Driven Frameworks, is that little technical and scripting knowledge is required and a single keyword can be used across multiple test scripts, so the code is reusable.

Of course, there is always the option of using a Best of Breed Automation Framework. It’s not unusual for testers to use a selection of methods to create the perfect solution for their testing needs. We would generally call this a Hybrid approach, taking the best of the above methods and making a solution that best suits the application under test.

Hybrid Testing Framework - automated testing frameworks can be integrated and they can be overlapped with one another. A Hybrid framework will use of any other frameworks to take advantages of the benefits and mitigate against the weaknesses of others.

The key benefit of a Hybrid framework, is that it can be quickly and easily adapted to your processes and is flexible to support a wide range of applications and languages. This will enable the test team, regardless of their background and skill set, to contribute to the testing efforts.

To conclude, as every application is different so should the processes used to test them. As the world of IT shifts to a more Agile delivery model, automation becomes more important and setting up a flexible framework for automated testing is crucial to the success of testing. There are many business benefits for adopting automation, and choosing the right framework will bring enormous benefits. So next time you’re cooking up a gastro feast, think about using the recipe book to ensure you deliver a perfect meal time after time.

If you require assistance or help in understanding test automation frameworks and working out what will be best for your organisation, then do contact nFocus for a consultation.

Download our Keoghs Test Automation Case Study here

Topics: Software Testing, Test Automation Frameworks

nFocus Blog

Welcome to the nFocus software testing blog. As thought leaders and technical innovators, we created this blog to distil our thoughts, ideas and musings on improving software quality.

Fill out the form below to receive future communications from nFocus including our latest:

  • Blog articles
  • White Papers
  • and plenty more!

Follow us

Follow us on LinkedIn to see our latest content!

Subscribe Here!

Recent Posts

Posts by Topic

see all