当前位置:网站首页>Netease UI automation test exploration: airtest+poco
Netease UI automation test exploration: airtest+poco
2022-07-03 16:26:00 【Programming simplicity】
1. automated testing
The purpose of automated testing is , Just for “ Faster and better ” To find product problems , Effectively improve product quality . At present, the mainstream automation testing includes unit test automation 、 Interface automation and UI automation .
Compared with interface automation testing ,UI The cost of automated testing is much higher , Because it faces the terminal interface , This adjustment may be very frequent , Which leads to UI The maintenance cost of automated test scripts increases .
However , Compared with Netease games with many large game projects ,UI Automated testing is also very necessary . Although the interface has been adjusted , But the cycle of large projects is usually long , During this period, many functions need to be frequently regression tested , Automation is about improving test efficiency 、 An effective means to reduce work costs .
2. Airtest The development of the project
2014 year , There is no automated testing framework that is very suitable for game projects , therefore , Netease self-developed AirtestProject And it started .
AirtestProject It mainly includes Airtest and Poco Two paragraphs UI Automated testing framework . After successfully serving dozens of project teams within Netease , Invited at 2018 Year of GDC Jointly released with Google at the Conference . Open source projects so far , Hundreds of thousands of developers and thousands of companies are using .
3. Airtest Pain points that the project wants to solve
AirtestProject Mainly want to solve UI Automated testing 2 A pain points , One is the poor versatility of the platform , The other is the high threshold of getting started .
Poor platform versatility , It means that some testing frameworks are not applicable to the testing of all platform products , contain Android、iOS And various game engines ; Netease self-developed Airtest and Poco Are cross platform testing frameworks ,Airtest Using the principle of image recognition, we can Platform independent ,Poco Support native and compatible with Engine independent .
The threshold is high , It means that some testing frameworks need to build complex testing environments , Testers also need to have some code programming ability , And read very detailed documents to get started . and Airtest and Poco Special editor for AirtestIDE Provide script recording and playback functions , Testers can record and run automated scripts with one click without writing their own code , It greatly reduces the threshold of automatic test script writing .
4. Airtest Details of the project
Airtest The project mainly includes 2 An automated testing framework , And a dedicated editor AirtestIDE:

1) Based on image recognition Airtest Automated testing framework
Based on the principle of image recognition Airtest Automated testing framework , Script WYSIWYG , Common clicks 、 slide 、 Waiting to appear 、 Assertion and other operations , Can be achieved through screenshot scripts , Test Xiaobai can also understand in seconds .
in addition Airtest The framework is compatible with various environments , And there is no need to embed code , It can be applied to the whole platform , It can help the project realize automation quickly .

2) Based on control recognition Poco Automated testing framework
Based on the principle of control recognition Poco Automated testing framework , It can accurately identify every one on the interface UI Control , Locate exactly ; And it can get the detailed properties of the control in real time , It is convenient to click on the control 、 Sliding and other operations .
in addition , Project interface iteration , To the original Poco The impact of scripts is very small , Because there are few changes to the controls on the page , So testers don't need to spend too much energy on maintenance Poco Script .

3) Dedicated editor AirtestIDE
In order to reduce the writing threshold of automated scripts , We also developed Airtest and Poco Framework editor , Devices that can help us easily connect to various platforms , It also supports one click recording and playback of automated test scripts :

The main functions it provides are :
① Devices connected to various platforms
stay AirtestIDE Device connection window , Support connection Android、iOS Equipment and Windows window , And you can view the device screen and operate the device in real time .
② One click recording and playback script
AirtestIDE Support one click recording Airtest and Poco Script 、 One click script ( The playback ) And one click View test report and other functions .
③ Simply drag and drop to complete the screenshot script
Click on Airtest Design of auxiliary window API Shortcut function , You can simply click 、 Drag and drop to complete our Airtest Screenshot script .
④ View the control tree of the device in real time
We can be in Poco View the current control tree of the device in the auxiliary window , And as we operate the device screen , The control tree in the auxiliary window will also be refreshed in real time . Currently, it supports viewing Android、iOS Control tree of native application , as well as unity、cocos And other game engine rendering application control tree , In the future, we will also support viewing Windows and Mac Control tree information of desktop application .
5. AirtestIDE Demo of recording and playback function
Here we use AirtestIDE Connect devices on various platforms to demonstrate some simple script recording or simple automated script operation :
1)Android platform
2)iOS platform
3)Windows application / desktop
4)chrome browser (Web)
5) Game applications (Android)
6. more Airtest Learning channels of the project , Look down
边栏推荐
- Cocos Creator 2. X automatic packaging (build + compile)
- The mixlab editing team is recruiting teammates~~
- 六月 致 -.-- -..- -
- June to - -------
- 2022爱分析· 国央企数字化厂商全景报告
- 在ntpdate同步时间的时候出现“the NTP socket is in use, exiting”
- 《天天数学》连载56:二月二十五日
- 高等数学(第七版)同济大学 习题2-1 个人解答
- NSQ源码安装运行过程
- Getting started with Message Oriented Middleware
猜你喜欢

How can technology managers quickly improve leadership?

Low level version of drawing interface (explain each step in detail)

Project -- high concurrency memory pool

面试官:JVM如何分配和回收堆外内存

2022 love analysis · panoramic report of digital manufacturers of state-owned enterprises

MB10M-ASEMI整流桥MB10M

【声明】关于检索SogK1997而找到诸多网页爬虫结果这件事

"Remake Apple product UI with Android" (3) - elegant statistical chart

Remote file contains actual operation
![[list to map] collectors Tomap syntax sharing (case practice)](/img/ac/e02deb1cb237806d357a88fb812852.jpg)
[list to map] collectors Tomap syntax sharing (case practice)
随机推荐
【Proteus仿真】8×8LED点阵屏仿电梯数字滚动显示
Visual SLAM algorithms: a survey from 2010 to 2016
切入点表达式
How can technology managers quickly improve leadership?
[combinatorics] combinatorial identities (sum of variable terms 3 combinatorial identities | sum of variable terms 4 combinatorial identities | binomial theorem + derivation to prove combinatorial ide
[list to map] collectors Tomap syntax sharing (case practice)
ThreeJS 第二篇:顶点概念、几何体结构
Deep understanding of grouping sets statements in SQL
[combinatorics] combinatorial identity (sum of variable upper terms 1 combinatorial identity | summary of three combinatorial identity proof methods | proof of sum of variable upper terms 1 combinator
PHP CI(CodeIgniter)log级别设置
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
Détails du contrôle de la congestion TCP | 3. Espace de conception
Is it safe to open a stock account by mobile registration? Does it need money to open an account
Golang anonymous function use
Pandora IOT development board learning (HAL Library) - Experiment 5 external interrupt experiment (learning notes)
相同切入点的抽取
Advanced Mathematics (Seventh Edition) Tongji University exercises 2-1 personal solutions
Mysql 将逗号隔开的属性字段数据由列转行
跟我学企业级flutter项目:简化框架demo参考
NSQ源码安装运行过程