It’s worthy of being Meituan’s internal “Interface Automation Testing Study Notes”. The detailed explanation is amazing.

Lego-Meituan interface automated testing practice

1.1 Overview of interface automation

As we all know, interface automated testing has the following characteristics:

1. Low investment, high output.

2. It is relatively easy to realize automation.

3. More stable than UI automated testing.

How to complete an interface automation testing project?

I believe that a "good" automated testing project needs to make good "trade-offs" from the three aspects of "time", "manpower" and "profit".

An automated script that took several hours cannot be executed just because some changes have occurred in the system under test. At the same time, we need to see the "benefits". We cannot do less or no verification just to see 100% success. However, if there are too many verifications, the maintenance cost will definitely increase, and a lot of maintenance may be required every day.

Therefore, it is not easy to balance these three aspects. It is often seen that students doing automation end up putting the cart before the horse.

I developed the Lego interface testing platform here to implement some of my automatic testing ideas. First, briefly browse the website to get an idea of ​​what kind of tool it is.

现在我也找了很多测试的朋友,做了一个分享技术的交流群,共享了很多我们收集的技术文档和视频教程。
如果你不想再体验自学时找不到资源,没人解答问题,坚持几天便放弃的感受
可以加入我们一起交流。而且还有很多在自动化,性能,安全,测试开发等等方面有一定建树的技术大牛
分享他们的经验,还会分享很多直播讲座和技术沙龙
可以免费学习!划重点!开源的!!!
qq群号:110685036

Ps: Due to the large amount of content, we will only show part of it this time. If you are not satisfied with it and want to learn more about this note and thoroughly master Meituan interface automation testing, learn more at the end of the article .

front page

Use case maintenance page

Automation use case list

Online execution results

Use case statistics

2. Script design

2.1 Lego’s approach

The Lego interface automated test script part uses the very common Jenkins+TestNG structure.

I believe it is not unfamiliar to see such a model, because many tests are composed in this way.

Storing automated test cases in the MySQL database has become a more common "data-driven" approach.

Many teams also use this structure to automate interfaces. If they continue to use it, the cost of learning and migration will be low in future "promotion".

Module 1: Lego-Meituan interface automated testing practice

1. In order to reduce development costs, use the more common Jenkins+TestNG script form.

2. In order to simplify code operations, use DB to store test cases and abstract the use case prototype.

3. In order to reduce the cost of creating new use cases, develop tools such as "use case maintenance page" and "one-click generation".

4. In order to reduce maintenance costs, add jump links and maintain a use case in a few minutes.

5. In order to increase the robustness of the use case, flexible parameter replacements such as "parameterization" and "pre- and post-action" are designed.

6. For ease of use and compatibility, unify the "return result" type and unify the use of "checkpoints".

7. To provide direction for interface automation use case design, use Jacoco to make code coverage statistics and develop related configuration tools.

8. In order to facilitate data analysis, various data are crawled from DOM, CAT, and Jenkins and displayed in charts on the page.

9. In order to optimize use cases, data such as "use case scoring" and "online call volume ranking" are provided for assistance.

Module 2: Practical smart payment stability test

Meituan Pay carries all of Meituan’s transaction traffic and can be divided into two types of businesses: online payment and smart payment according to usage scenarios. Online payment supports users’ online consumption scenarios, processes all online transactions of Meituan, and provides payment capabilities for business lines such as group purchases, takeaways, and hotel travel;

Smart payment supports users’ in-store consumption scenarios, handles all offline transactions of Meituan, and provides merchants with efficient and intelligent cashier solutions through smart POS, QR code payment, box payment and other methods. Among them, smart payment, as a newly expanded business scenario, also became one of Meituan’s fastest-growing businesses last year.

Module 3: Practical practice of optimizing the power consumption of short videos on Dianping App

The Meituan testing team is responsible for the quality assurance of the App. In addition to the functional testing of the App, it also focuses on the performance testing of the App.

Nowadays, everyone is becoming more and more dependent on mobile phones, and the power consumption of the above Apps directly affects the standby time of the mobile phone, which is a point of great concern to users. This article mainly introduces the power test in App performance testing through a typical case, and summarizes some of our thoughts arising from it.

Module 4: The beauty of "niche" - the application of Ruby in QA automation

Regarding automation in the field of testing, many articles have been introduced, and "black technologies" are also everywhere, such as recording interfaces through Java bytecode technology, converting Fiddler recording content to Python scripts, instrumentation debugging in Apps, etc. , it can be seen that different perspectives have different understandings of best practices. What I want to elaborate here is that the Waiwai (Shanghai) QA team uses the relatively "niche" Ruby to share some practices and experiences in automated testing under limited resources.

Module 6: Meituan-Dianping cloud real machine platform practice

As Meituan-Dianping’s business grows and its R&D team grows larger, the demand for test phones has grown significantly. This is a large expense for the company, but the existing test mobile phone resources are unevenly distributed and the utilization rate is also very limited, making it difficult for each team to cover multiple models during the development and testing process. How to reasonably and efficiently utilize these test mobile phone resources is a difficult problem before us.

Module Seven: Preliminary Practice of Quality Operations in Smart Payment Business Testing

There is no doubt that quality is one of the key factors that determine the success of a product and the sustainable development of an enterprise. For Internet companies in the "Quality Era", how to take quality into account in the rapid iteration rhythm and truly realize "everyone values ​​quality, everyone creates quality, and everyone enjoys quality" is a requirement for QA and also for the entire product technology. Important challenges facing the team.

Quality operation is to inject operational ideas into quality assessment and improvement work. It focuses on the entire life cycle of the product, is quality-centered, and data-driven. It ultimately improves delivery quality by building a continuously iterative quality assurance system. This article will focus on the testing stage during the research and development process, taking improving the quality of testing as an example, and introduce the preliminary application of quality operations in the smart payment business from aspects such as plan formulation, strategy application, and effect evaluation.

Summarize

After a period of exploration and practice, we have significantly improved the quality of test preparation, and the methods, processes and tools accumulated in the process are also being promoted and used. However, test quality is only a small part of the whole life cycle quality operation. The rapid development of smart payment business not only requires iterative optimization of the entire quality assurance system, but also requires all members to continuously improve their quality thinking and continue to pursue the ultimate quality, thereby forming a A quality culture that truly realizes "everyone values ​​quality, everyone creates quality, and everyone enjoys quality."

Finally, I would like to thank everyone who read my article carefully. Looking at the increase in fans and attention, there is always some courtesy. Although it is not a very valuable thing, if you can use it, you can take it directly!

Software Testing Interview Document

We must study to find a high-paying job. The following interview questions are from the latest interview materials from first-tier Internet companies such as Alibaba, Tencent, Byte, etc., and some Byte bosses have given authoritative answers. After finishing this set I believe everyone can find a satisfactory job based on the interview information.
 

Insert image description here

おすすめ

転載: blog.csdn.net/IT_LanTian/article/details/132766388