Commonly used automation frameworks
An automation framework is essentially a set of guidelines, best practices, and tools that provide a structured way for automating the testing of software applications. It helps to improve on maintainability as we define code standards, naming conventions, and best practices for the team to follow.
Over time, different automation frameworks are created/evolved according to technologies and requirements. Today we’ll be introducing a few common frameworks and their pros & cons.
Evolution of Automation Frameworks
Linear Automation Framework
Let’s start with the Linear Automation Framework (aka Record and Replay). Just like its name — you literally just have to record and play your recorded script and voilà~ (you don’t have to be an automation expert to do this.
Modular-driven Framework
With that, the next generation of framework is invented. Modular-driven frameworks divide the application into smaller, isolated modules.
Automation test scripts are created based on individual modules, and can also be combined to form larger test scripts for end-to-end or cross-modules integration testing.
Data-driven Framework
To overcome the problem of test data being hardcoded in the script, the data-driven framework appears! The test logic is segregated from the test data, which is usually stored in external data sources like csv, excel, database, etc.
Referring to the scenario below, a single login test script can be used and calling different data sets to test for different scenarios, including the negative ones.
Keyword-driven Framework
Keyword-driven framework is fundamentally built on Modular-driven framework. It is sometimes known as Action Word-based testing or table-driven testing. Every action or function is represented by a keyword.
A keyword can be as simple as performing a click/select/verify text to a complicated function that contains multiple steps such as login (from launching the application, entering username and password and clicking the “Enter” button).
Hybrid Framework
To change for the better and overcome some of the shortcomings of existing frameworks, a hybrid framework is here (this is one of the most popular choices!). As the name suggests, it combines two or more frameworks together (e.g. Keyword-driven + Data-driven).
Which automation framework to select?
Modularise and use of libraries for scripting make it more scalable. With more reusability, it will definitely increase efficiency. As we set the rules here, a more organised and structured way is introduced.
While the above list is not exhaustive and with so many frameworks available, which one should we be choosing? 🤔🤔🤔
Well, there is no universal automation framework that fits all scenarios! Newest doesn’t mean it’s the best. Considerations such as project requirements, objectives, team expertise, technical or business orientation, as well as constraints related to time and budget, play a significant role in determining the most suitable approach.
Say we have a simple survey application, for which the validity of each survey is for a short period of time only, hence it’s not necessarily for the automation scripts to be maintainable. To add on, the testers are new to automation testing.
In this situation, opting for Record-and-Replay can be more advantageous for testers looking to rapidly establish and adopt automation testing. Given the frequent alterations in the entire survey, the automation scripts become less practical, making it acceptable to consistently record the workflow afresh.
Compared to dealing with a more complex application with a team of seasoned automation testers seeking for a customisable automation framework, hybrid framework is typically the preferred choice.
As you can see, each project is entirely different and so, there isn’t a generic framework that can suit them all. Just like any other processes, automation testing frameworks may converge and overlap, thus more frameworks will be developed in the long run. Regardless of which framework is being used, the ultimate goal is to boost testing productivity with standardisation.
That’s the end of our last article for the year 2023. We wished you a Merry X’Mas and a Happy Holiday! See you all next year!
🧙🏼♀Team Merlin 💛
Application security is not any individual’s problem but a shared responsibility.