Guide to the key points of the Automation Testing process | DeviQA
DeviQA LogoDeviQA is the finalist of the Software Testing Award 2019

Guide to the key points of the Automation Testing process

By on 2021-10-20T00:00:00.000Z
Guide to the key points of the Automation Testing process

There is hardly any manual QA engineer who would never have thought about shifting to automation testing. It is quite understandable. Automation is mainstream in software testing today. While manual testing is still relevant, automation testing is just next-gen technology opening new horizons. If you want to take a step towards the profession of automation QA engineer, this article can help you to get into the basics of automation testing.

What is automation testing?

Automation testing is a technique of software testing that is opposite to manual testing, which means that it suggests the use of special software tools for the execution of the pre-scripted tests with minimum human intervention. It is considered to be an essential practice for DevOps and Agile development.

As a rule, automation testing is implemented only after initial manual testing and when an application under test (AUT) is stable enough. Test scripts written in a particular programming language are used for navigation across the AUT and comparison of expected test outcomes with the actual ones that are recorded to a test log. Once written test scripts can be rerun as frequently as it is needed. To avoid test failures as well as to obtain accurate results it is important to keep test scripts in compliance with changes in a developed application. Besides, it is no less important to automate additional scenarios throughout the system whenever it is relevant. The thing is that it is reasonless to automate all tests, but only those that are repetitive, data-driven, time-incentive, have critical importance for business, etc.

To gain maximum efficiency and reduce maintenance costs, test automation frameworks are used. A test framework is a scope of guidelines outlining the principles of test script design and writing. All in all automation testing is the way to go if there is an urgent need for QA process optimization and acceleration.

Advantages and disadvantages of automation testing

Advantages and disadvantages of automation testing

At first sight, it may seem that automation testing is rather complex and costly, but while being wisely implemented it can bring numerous benefits. So let's consider the most important ones.

ADVANTAGES:

Speed

Speed is probably the most significant advantage of automation testing. With its help, the whole scope of tests can be executed at lightspeed compared to the manual testing technique. An incredible speed is provided with not only fast test execution but with the ability to execute tests simultaneously on several devices or platforms. The opportunity to run tests beyond working hours also contributes to the acceleration of a QA process. Thus, automation testing is a great way to reduce time-to-market.

Fast feedback

As long as automated tests can be run whenever it is necessary and at speed, a development team, as well as a management team, can take advantage of fast feedback. This approach is useful as developers can quickly identify the cause of defects and fix them. It is always easier to gain insight on the recently written code than one written a few weeks or months ago.

High test coverage

With automation testing, there is an opportunity to check test scenarios that cannot be tested manually. First of all, it is subject to various types of performance testing. Apart from that, as long as automated tests can be run without human supervision, a QA team has a lot of time and can concentrate on the design and execution of additional tests which also results in higher test coverage and therefore better product quality.

Cost efficiency

As an application is being developed, the scope of testing is growing. To cope with this and meet deadlines there is a constant need to increase the number of QA engineers. Consequently, it results in constantly growing testing expenses. Automation testing is what you need in this case as one skilled automation QA engineer can replace a legion of manual testers. Automation testing is indeed cost-efficient in the long run whenever it comes to ambitious projects since the more frequently you rerun automated tests the higher ROI you get.

Accuracy

Since manual testers are exposed to tiredness, boredness, and burnout, there is always a high risk of errors. Automation testing is devoid of such hazards. Every time automated tests are executed just in a pre-programmed way. Thus, there is no room for errors and omissions and a team can reckon with certainty on testing results.

Reusability

As was mentioned before, all the beauty of automation testing is that once created test scripts can be rerun whenever you need to check software for possible errors that could appear as the result of any changes in a source code or environment.

Autonomy

Automation testing aims to minimize the testers' efforts by eliminating human intervention or bringing it down to a minimum. As test scripts can be run unattended and at any time of the day or night, a QA team can throw efforts into other critical or creative tasks.

High quality

Automation testing is not only about speed but also about effectiveness. By implementing it, you can be sure of high product quality as all required tests can be executed within the stated time frame and with high accuracy.

As you see the list of automation testing advantages is pretty long and in fact, it can be extended with many more. However, at this point, we would like to draw your attention to another side of the coin. The thing is that along with pros automation testing also has certain corns. Moreover, some of its pros can be its corns at the same time. Let's delve into details.

DISADVANTAGES:

Significant investment

Automation testing is rather expensive in the initial stage and requires a significant upfront investment. Despite the open-source automation frameworks and tools are available today there is often a need for commercial ones. It must be noted that automation tools are expensive while far too often one tool does not support all types of testing. Investment in automation testing justifies itself only when it is implemented in large-scale projects.

High learning curve

Automation testing requires coding skills and expertise in the most diverse tools and technologies. Therefore to shift to automation testing you should train your available staff or hire experienced automation QA engineers and seasoned automation QA architects. It is worth mentioning that the latter is pretty hard to find on the job market.

Challenging test debugging

Whenever tests fail, the reason is a defect in a tested application or test scripts. An error in the test script sometimes may result in catastrophic consequences. Still, pretty often it is not easy to locate an error in tests and fix it. A rich experience is needed to cope with this.

Ongoing test maintenance

Since a developed application undergoes constant changes, available test scripts must be correspondingly maintained and updated after each code modification in order not to fail during the next test run. Test maintenance can be rather costly and time-incentive. To make the maintenance process as hassle-free as possible, it is recommended to use the most suitable and efficient frameworks and testing tools.

Not immediate implementation

Automation testing cannot be implemented from the very outset. Automated tests can be run only after initial manual testing and when an application is stable enough. Besides, shifting to automation testing requires serious preparation that can be pretty time-intensive as there is a need to find specialists if you do not have them in place, select test automation framework and tools, or even build your own framework from scratch, write test scripts, etc. So for small projects manual testing is more relevant in terms of both time and money.

Narrowness

Earlier we mentioned that automation testing provides high test accuracy as they are executed according to the preprogrammed scenario. However, this approach also has the other side. In these terms, automated testing can be compared with a fabulous Ferrari on a well-studied and straight track, while a human tester is a range-roving vehicle on a tricky mountain road. What we want to say is that automation testing has certain limitations due to its specificity, as a result, unlike manual testing, automation testing cannot execute random testing and without timely maintenance may face numerous failures as scalability issues grow.

Specifics of automation testing process

To yield multiple benefits it is crucial to set up the automation testing process in the right way. Its phases are pretty obvious but we would like to outline them for those who are taking the first steps in this direction.

Project analysis

It is obvious that first of all, it makes sense to study a project and available requirements thoroughly in order to understand whether there is a need for automation and to what extent.

Goal setting

Then, it is essential to determine the scope of automation testing along with the goals and priorities that would serve as benchmarks for the whole QA process.

Design of automated testing strategy

Working on an automated testing strategy QA specialists plan all testing activities in detail. The most diverse aspects of automation testing are defined, e.g. required resources, automation testing technique, appropriate testing tools, test cases to automate, requirements to a test environment and test data, etc.

Testing framework setup

A framework is an essential component of automation testing. While being properly selected it ensures test reusability and efficiency, reduces human intervention, simplifies test maintenance, makes it cheaper, and many more. So it is important to adjust a chosen automation testing framework or build your own one fulfilling all project needs.

Test environment configuration and test data generation

To provide proper test execution, a QA team must configure a test environment i.e. hardware, software, and network in compliance with predefined requirements. Test data also plays no less important role in successful automation testing. That is why it is crucial to generate high-quality test data simulating the real one.

Test script development

At this stage, an automation QA engineer writes test scripts being guided by previously designed test cases. The purpose is to create stable test scripts that are resistant to UI changes. Besides, it is highly recommended to design atomic test scripts as such scripts, compared to end-to-end ones, enable easy error localization in case of a test failure.

Test execution

Automated tests should be run early and often, i.e. as soon as an application under test is stable enough and on each new build. In case CI/CD is used it is essential to integrate automation testing into the pipeline.

Test maintenance

We have already said that test maintenance is of primary importance as it ensures compliance of automated tests with an evolving application under test. Although modern frameworks strive to provide autonomous test healing there is still a need for human intervention. Automation engineers update existing tests, fix flaky tests, and write new tests on an ongoing basis.

The main challenges of the automation testing process

The main challenges of the automation testing process

Automation testing is a wellhead of benefits on the condition that it is properly implemented. That is why it is important to know not only the advantages of automation testing but also the pitfalls that QA teams face while shifting to automation testing.

Significant investment

Frankly speaking, automation testing comes at a price. At the initial stage, it requires significant investments. That is why it can be rather challenging to persuade a management team to consider its implementation. Still, it is a well-known fact that investment in automation testing is paid back in the long run.

High barrier of entry

Automation testing requires a particular skillset and mindset. Knowledge of programming languages and corresponding technologies is a must. Besides, a rich experience is required to set up the automation testing process from the get-go. Not everyone can successfully master the profession of an automation QA engineer.

Inflated expectations

While automation testing is indeed a great way to boost a QA process, it is important to understand that an automation QA engineer is not a fairy godmother who can solve all problems with a wave of a wand. In these terms, it is essential to set realistic goals and realize that not all tests can be covered with automation and even those that have been automated should undergo continuous monitoring and updating in order not to fail in the next run.

Test maintenance

And now we are smoothly switching to the main challenge. When it comes to automation testing, test maintenance is considered to be its Achilles' heel. For a newbie, it can be a real nightmare while negligence of test maintenance can lead to total chaos and have catastrophic consequences. Test maintenance can be time-incentive and labor-consuming but it is still a must to avoid test failures and live up to changes in the software under test.

Tool selection

A properly chosen tech stack is half the battle. Still, it is easy to get confused and distracted while trying to make your mind on testing tools. The thing is that the modern market offers a great variety of solutions both open-sourced and commercial. Moreover, one testing tool hardly can meet all your requirements, not being able to provide execution of all testing types and support integration with all your technologies. Before making a final decision it is important to identify the needs of a project, determine goals including long-term ones, compile a list of requirements for a testing tool, thoroughly study the market of testing tools, and take advantage of a free trial that most tools offer.

Common automation testing tools and frameworks

The choice of automation testing tools is indeed rich. Which one to choose depends on your testing needs and the peculiarities of your project. Below the most popular testing solutions are presented.

Kobiton

TestComplete

Ranorex

Eggplant

LambdaTest

Selenium

QTP

Silk Test

Watir

IBM Rational Functional Tester

Cucumber

Appium

XCTest/XCUITest

Katalon Studio

SoapUI

Types of Automation Testing Frameworks

A testing framework is what makes automation testing more efficient and simple. Still, there are different kinds of automation testing frameworks, and it is important to understand the difference between them in order to choose the one that suits you.

Linear scripting testing framework

The linear scripting framework is the simplest one as it is based on the record and replay approach. In this case, programming skills are not needed as there is no need to write a custom code. Testers manually record tests steps like navigation within an application and data input and then replay them when it is needed. It is worth mentioning that although it is the simplest and quickest way to create tests, it has many weak spots when it comes to reusability, scalability, and test maintenance.

Modular testing framework

A framework of this type suggests a division of an application under test into separate modules and the creation of a separate test script for each of them. These scripts are combined to form larger tests hierarchically. This approach considerably simplifies test maintenance as modification of one module does not or just slightly affects other modules. As well as the previous framework, the modular testing framework does not enable testing with different data sets but requires certain coding skills.

Library architecture testing framework

This type of framework uses the same principle as the previous one. Application is also divided into modules but in this case, the latter are also grouped according to the functions. Onse functions are identified and grouped, they are stored in a library to be reused for the creation of new test scripts with the same functions. A library architecture framework is suitable for applications having similar functionalities in its constituent parts. With this framework, test scalability and maintenance are easier, but test script creation is more time-incentive. However, the problem with test data still exists, as particular test data is hardcoded straight within test scripts.

Data-driven testing framework

This type of testing framework is a far cry from the all considered earlier. The main difference is the separation of test data from test scripts. Instead of being hardcoded within scripts, test data is kept in external sources. This approach significantly simplifies the whole process when there is a need to test the same app function with numerous variables of test data. In such a way the number of test scripts can be reduced while testing is executed faster. However, we cannot help but notice that only highly professional automation QA engineers can cope with this, whereas framework setup takes quite a lot of time.

Keyword-driven (aka table-driven) testing framework

When a keyword-driven testing framework is used, test data is also kept externally. Apart from that, there is a table of keywords stored externally a well. These keywords are action words associated with a particular function or method to be executed.

With this framework, QA specialists use keywords to create any test script. Therefore, even testers with basic knowledge of programming can work on the test scripts, but substantial experience and knowledge are required to set up such a framework.

Hybrid testing framework

As you may guess, a testing framework of this type represents a combination of the previously mentioned frameworks. This way it is possible to benefit from the advantages of each framework while mitigating the drawbacks.

Conclusion

Today automation testing is the norm. DevOps and Agile teams just cannot imagine a software development process without automation testing. So it is not surprising that it is still a hot-button topic. Those who have not adopted it try to do this while those who have already benefited from it try to find new ways to make the established automated testing process even more efficient. This article just cracks the door to the world of automation testing letting you get acquainted with some basics. Stay tuned for more details on the topic