Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Subdivided automated testing

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Resource recommendations:

Video resources: series of videos related to software testing

Community Resources: automated Test Communication Group

Background introduction

The topic of this chapter is "how to subdivide automated testing?" Newcomers in many areas of automated testing may have doubts about automated testing. automated testing does not have a clear direction and concept. This article leads you to expose software automated testing on common problems.

common problem

1. What kind of automated testing do we need to do?

two。 Is the system suitable for what kind of automated testing?

3. What kind of testing tool should be selected for automated testing?

4. What should be the coverage of automated tests?

. . . There are many similar problems, so we will not list them one by one.

Let's first summarize what we have discussed in this article, as follows:

1. Automated test classification.

2.WhatMagneWhy when to implement automated testing.

3. The scope of application of common automated testing tools.

Automated test classification

According to the purpose of the test, it can be roughly divided into: functional automated testing, performance automated testing.

According to the test object, it can be divided into: Web application test, APP test, interface test, unit test, etc.

Functional automation

The purpose of the test is to find out whether the functions implemented in the software meet the user requirements and specifications. Many newcomers may unilaterally think that it is a test of whether the user interface functions meet the requirements. In fact, there are many entry points for functional automation testing. Do not limit your thinking to the user interface, but should focus on the various components of the software system, which has been proved by practice. Automated testing based on system UI can only find very few defects in the software. Often, the purpose of implementing UI automated testing is not to find defects in the software system, but more to verify whether the system can run normally. This sentence is particularly important for everyone to implement automated testing.

In addition to automated testing based on UI, we can also test based on network service interface providers, such as Grpc service, Webservice interface, Restfull and so on. Functional testing based on interface is more common and a very effective means.

In addition, you can also test based on the basic code of the system, such as unit testing, integration testing phase, which is also called white-box testing. We can test DAO,Service services directly. The commonly used testing techniques here include Junit, TestNG, Mock, Stub and so on. Many testing friends about mock and stub often confuse the difference between the two, limited to the length and accuracy of the article. Here we will not explain the difference between mock and stub too much. You can refer to Mocks Aren't Stubs. What the new students need to pay attention to is that due to the limitations of the software development model applied by the enterprise, the testing at this stage is less used in the actual work scene, and more of them are completed by the development students themselves.

Performance automation

Performance automation testing uses test tools to simulate high concurrent loads for stress testing to find the bottlenecks of the software system running under high loads. The system bottlenecks here include many parts, application performance bottlenecks, network bottlenecks, server hardware resource bottlenecks (CPU,MEM,DISK), data storage servers and so on. This testing activity is usually completed only with the help of automated testing tools. Common performance testing tools include Loadrunner, Jmeter, Ngrinder, Gatling and so on. No matter which testing tool is used, there are basically three parts: test script management, test scenario configuration, and monitoring results.

Similar to functional automation, the performance testing work object can also be oriented to the user UI layer, or the service interface provider, or even directly to the underlying basic business logic layer. The vast majority of performance testing through the user layer simulates the test closest to the real user scenario, which is also the inevitable implementation stage of performance testing. In addition, interface-oriented performance testing is also a very effective stage to find system performance bottlenecks. We should carry out it selectively according to the actual work needs.

3W principle

In the face of a wide variety of automated testing, we need to do in-depth research work before implementing automated testing, so as not to cause unnecessary workload or fail to achieve the desired results. This is also an issue of great concern to members of the testing team. In order to carry out automated testing more effectively, we had better answer the following questions carefully before testing.

(what) what kind of automated testing do we need to implement?

Is it based on functionality or performance? Different purpose of automated testing will directly affect our follow-up work, such as test intervention time, test scenario design, personnel, machine resources and so on.

In addition, it is worth noting that not all systems are suitable for functional automation or performance automation, we should choose according to the actual needs, for example, in the face of UI automated testing, when the front end of the system changes frequently, or when the iterative cycle is limited (common in outsourced testing), it is not suitable to carry out UI automated testing.

(why) Why do you need automated testing?

Instead of finding flaws in the software system. Here, performance testing is special, it is too expensive to test manually or manually, and automated testing can solve the problem that manual testing is difficult to solve.

(when) when will automated testing be carried out?

As mentioned earlier, whether it is functional or performance automation, the objects we test can be the user layer, the service interface provider or even the basic business code. we all know very well that the earlier the defects are exposed, the lower the cost of solving them. therefore, according to the needs of the actual work, automated testing should also be carried out as early as possible, such as performance testing. We can conduct a performance test after the basic business code function test is passed to find the performance problems caused by the code level.

In conclusion, based on the 3W principle, we can make our testing work more targeted and accurate, and the previous work can make the future work more smooth and efficient.

Common automated testing tools

There are a variety of testing tools in the industry, and there are many differences in the scope of application of different testing tools. Many newcomers often have problems with the choice of tools, or they are not clear about what tasks they can accomplish with various tools. For example, many new testers have asked me: can Loadrunner automate interface functions? Can Selenium do performance testing? Etc., in the face of a variety of questions, it is sometimes difficult to answer, these questions can be answered in the affirmative at some times, but the use of such tools in these scenarios is not your best choice, which requires the experience of using tools to accumulate slowly. At the same time, consult and learn from your predecessors.

The following is a brief list of common tests and the best testing tools for them.

Performance testing tools: Loadrunner,Jmeter,Ngrinder,Gatling, each testing tool has some differences and limitations, you can refer to the relevant documents for detailed understanding.

Functional testing tools: Selenium, QTP

APP automated testing tools: Appium, UI Automator, MonkeyRunner, Android UI testing recommended to use UI Automator, is the automated testing framework provided by Android, basically supports all Android event operations. IOS applications can choose to use Appium.

Interface automation testing tools: Junit,TestNG, OKhttp, HttpClient,Spring Restful, etc., need to have some coding experience, of course, there are ready-made tools, such as Postman,HttpRequester,SoapUI and so on.

Unit testing tools: Junit, TestNG, EasyMock, Mockito, JMockit, etc.

Click the link to join the group [Yue sharing testing Alliance]: https://jq.qq.com/?_wv=1027&k=5DiePik

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report