Through the last article, you can realize the importance and advantages of automation, and you must determine the use cases that can be automated. To this end, one must consider the goal pursued and at what level this goal is in the testing pyramid.

Try to answer the following questions:

What is the goal?

The first thing that needs to be confirmed is to always aim for a higher level of software quality and analyze whether automation is suitable for the project.
To answer this question, it is recommended to conduct a feasibility analysis of the target.
The following are some of the scenarios that are most likely to be automated:

  • There is technical debt to be eliminated;
  • Regression testing is very time-consuming;
  • The project is very complex and long-term.

Which test cases should be automated?

Not everything can be automated in context, which is the relevant reason to understand which cases serve our purpose. In terms of code level and developers, unit testing is the easiest to script. In terms of testers, we usually focus on automating regression cases at the UI and API levels, first considering the most critical and complex processes.
The following are test cases that can be automated:

Regression Testing

Given that we already have a test suite that must be executed regularly after each product release, the work of manually running these suites has become repetitive. In addition, we need to take time from other tasks that cannot be automated, and we can get more value from these tasks. . These regression test cases are highly automated and are especially easy to integrate into the CI/CD model. This increases the cost and time required to perform other tasks, because the script can be executed unattended while performing other activities.

High-stakes test

These cases are usually negotiated by stakeholders, focusing on checking high-priority and critical functions. If they fail, they will greatly affect the business model. This is why this method is called "risk-based testing".
Cases that automate testing of these features can help you immediately discover risky events that may prevent the release or that must be dealt with quickly after each release.

Complex or time-consuming testing

In a project, there may be some complicated situations that need to be copied manually, so if we convert them into scripts, it will be easier to execute them in an automated way. If it is a form that contains a lot of data, the tester may be more prone to errors, especially when multiple data variants must be used to test the same form. At this time, automation can be used to reduce the probability of errors.

Repeat test cases

Just as regression testing has become a repetitive task, in some special cases, it can be easily automated. For example, manually testing a large amount of data in the same process takes a lot of time, and having to repeat the test makes the process more tedious. However, by automating this process, we can parameterize these data without manually testing each value. This is also known as data-driven testing, where automated testing is parameterized and data is obtained from data sources (such as files or databases).

Tool selection

Now that we know what to automate, we can continue to choose the tools to use. Given the number of available tools, this activity may be one of the most complex analyses, and the decision will have to consider the projects involved, budget, knowledge, and experience.
There are several open source, commercial, and custom tools, and their limitations and usability vary. To choose the right tool, you must be clear about what requirements must be met to continue the cost-benefit analysis of its use.

Here is a brief overview of some test automation tools:

  • Selenium: An open source tool that is widely accepted worldwide for testing Web applications on different browsers and platforms.
  • Appium: Another open source framework (based on Selenium), mainly used for test automation on iOS and Android mobile devices.
  • Cucumber: This tool is part of the BDD (Behavior Driven Development) approach. The main advantage of Cucumber is its ease of use, because it is very intuitive, provides a wide range of functions, and is open source.
  • ZTF: Zentao Testing Framework, is an open source automated test management framework that focuses on automated test management functions, which can solve problems such as use case information management, test script execution, test result comparison, and defect bug submission.
  • ZenData: ZenData is an easy-to-use general data generation tool that has two main functions: data generation and data analysis. It supports one-click generation of massive data for performance and stress testing, and is suitable for large-scale, engineered automated testing.

It should be noted that there is no best tool for all situations. According to the application under test and decision-making standards, you can choose between different software more flexibly.


陈哥聊测试
158 声望3.3k 粉丝

资深敏捷测试顾问,国内知名项目管理软件禅道团队成员。