The Definitive Guide to Choosing the Best Test Automation Framework

Hanna Tsikhachova

Hanna Tsikhachova

Senior QA Engineer, QA Consultant

Quality Assurance
Nov 4, 2022
5 minutes to read
  1. What are test automation frameworks and why do you need them?
  2. Automation framework types
  3. Test automation frameworks: how to choose the right one
  4. Conclusion

Test automation (autotests) as a part of quality assurance services is not just a modern trend in the IT sphere, it is an effective way to control product quality, decrease manual work, and release new functionality more often. Autotests emulate user activities such as clicking on buttons, filling in forms, sending API requests, performing operations with databases, downloading apps, and more. Automated scripts can be written once and executed as often as it is needed, e.g. after changes in the code are made. They help to ensure that the existing functionality isn’t broken and the key features needed for successful releases are working.

QA automation engineers write autotests using dedicated software called test automation frameworks. These are chosen for each project individually with consideration of its features and the testing required. What is an automation framework, what are the key differences between the best test automation frameworks, and how to choose between them? Read on for deeper insights into the matter.

What are test automation frameworks and why do you need them?

Testing frameworks are sets of tools designed to solve particular problems. They consist of many libraries working together as one instrument and facilitating the development. Generally, there is no need to create a unique test automation framework for a specific project as there are many that you can get on an open-source and turnkey basis.

When using an existing QA automation framework, set the goals you want to achieve, e.g. performing cross-browser testing, testing across various mobile devices, API testing, or ensuring full coverage of end-to-end regression scope. Subsequently, the team will study the documentation. Even if QA automation engineers face difficulties when setting everything up, they will solve them by turning to online communities.

When determining the direction of the development, mistakes are detrimental. Therefore, if you don’t have enough expertise, it is better to turn to experts who offer qa automation services. They specialize in solving such issues and will help you set goals, choose the best test automation framework, draw up a plan, and set up the processes.

Automation framework types

Knowing at a high-level view how instruments are working will streamline your decision-making. As a rule, five automation framework types can be considered.

Types of test automation frameworks

Coordinate-based recognition tools

They use x/y coordinates to interact with an app and verify data. To find a UI object, the tool locates its coordinates and length value. This is a highly accurate approach; however, written tests are unstable when there are different screen sizes, resolutions, and orientations.

Native object recognition tools

In this approach, UI elements are located on their given element tree that is built by means of CSS or XPath. Every visible element on the page has its ‘address’ that can be written in different ways. The elements will then be located regardless of their actual positions on the page. Therefore, the path to a UI object can be written once, and the checks are then successfully conducted on devices with various screen sizes and resolutions.

The risk of inclining to this approach is that the test won't fail if UI objects have changed position on the page. If their XPath stays the same, elements will be found and bugs can be missed.

Text recognition tools

They are able to locate items by their given text. For example, the text on the button “Pay now” will most likely not be changed. This approach is highly stable except for the cases when the apps on several supported languages are tested.

Capture and replay tools

These offer the opportunity to record automated scripts. All user interactions with an app such as scrolling, typing, and so on will be translated into code. Anyone can then perform these actions, not only an experienced AQA engineer. Sounds amazing, doesn’t it?

The problem is that any slight change in the element location, text, or program behavior will require rewriting lots of pieces of algorithms. Experienced QA automation engineers combat this issue by reusing code components. This allows them to support the autotests more easily, as when you have to change an element that is used, for example, in fifty tests, you only make the change in one place.

Image recognition tools

This approach isn’t used very often. After screenshots of relevant UI parts are placed into an automation script, every run of the program will compare saved screenshots with the current UI state. If there is a difference between the expected and actual results, the test will fail. The QA tester will describe the problem and recheck it after the fix.

This method is exceptionally accurate and spots even slight changes that aren’t noticeable to the human eye. However, such ultimate accuracy can become a disadvantage as, when testing several screen resolutions, even the slightest difference in fonts or colors will cause the test to fail.

Usually, the above automation framework types can be combined depending on your goals.

Test automation frameworks: how to choose the right one

The following factors can influence your choice:

  • Programming language. Cypress autotests can be created in JavaScript, Pytest supports Python, and Appium tests are traditionally associated with Java. Some QA testing frameworks, e.g. Playwright, support multiple programming languages. Therefore, language is one of the determining factors when making a choice.
  • Platform. Are you developing a web app or mobile apps? What browsers or kinds of mobile apps are you considering? Pay attention to the list of supported browsers and devices in the instrument documentation.
  • Reporting. A solid solution must provide customized dashboards to generate reports and share them. The reports should give full information about test runs to perform analysis and understand potential problems.
Test Report
  • Ease of scripting. How much time will it take for a specialist to start writing scripts with the tool? A sound automation framework provides comprehensive documentation, wide opportunities for reusing test components, and flexibility for reusing parts of the code.
  • Integration. If connecting a tool to your bug management system, test management system, or CI workflow is required, investigate what integrations are supported by the automation framework.
  • License type and cost. Open-source frameworks look like the easiest way to start; however, not every tool will match your project. In addition, some open-source solutions offer useful features you pay for. For example, if you plan to execute tests on a number of machines, there is a so-called runtime license. Therefore, make sure that you aren't spending money on unnecessary features.


There is no 100% ideal automated testing framework that will suit everyone and make your autotests flawless. Lots of factors should be taken into account.

To be perfectly sure that the right choice is made, it’s better to trust the help of professionals. Andersen has fifteen years of experience in automation testing and setting up processes from scratch for startups and enterprises all over the world. Contact us, and we will reach the optimal decision for your project based on its needs and goals.