当前位置:网站首页>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
边栏推荐
- 线程池执行定时任务
- Google Earth engine (GEE) - daymet v4: daily surface weather data set (1000m resolution) including data acquisition methods for each day
- Basis of target detection (IOU)
- Is it safe to open an account with flush?
- Record windows10 installation tensorflow-gpu2.4.0
- [solved] access denied for user 'root' @ 'localhost' (using password: yes)
- [combinatorics] combinatorial identities (review of eight combinatorial identities | product of combinatorial identities 1 | proof | use scenario | general method for finding combinatorial numbers)
- [combinatorics] non descending path problem (outline of non descending path problem | basic model of non descending path problem | non descending path problem expansion model 1 non origin starting poi
- From "zero sum game" to "positive sum game", PAAS triggered the third wave of cloud computing
- Explore Netease's large-scale automated testing solutions see here see here
猜你喜欢

Embedded development: seven reasons to avoid open source software

Uploads labs range (with source code analysis) (under update)

NSQ源码安装运行过程
![[web security] - [SQL injection] - error detection injection](/img/18/5c511871dab0e5c684b6b4c081c061.jpg)
[web security] - [SQL injection] - error detection injection
![[solved] access denied for user 'root' @ 'localhost' (using password: yes)](/img/71/1ff8ed1d773da99054310f96dca3f8.jpg)
[solved] access denied for user 'root' @ 'localhost' (using password: yes)
![SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]](/img/3b/7523eca5bbcdbba29d9b7f6e4791a5.jpg)
SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]

【Proteus仿真】8×8LED点阵屏仿电梯数字滚动显示
![[statement] about searching sogk1997 and finding many web crawler results](/img/1a/8ed3ca0030ea227adcd95e8b306aca.png)
[statement] about searching sogk1997 and finding many web crawler results

深入理解 SQL 中的 Grouping Sets 语句

Mb10m-asemi rectifier bridge mb10m
随机推荐
初试scikit-learn库
[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
Page dynamics [2]keyframes
TCP congestion control details | 3 design space
【LeetCode】94. Middle order traversal of binary tree
Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (I)
[web security] - [SQL injection] - error detection injection
[combinatorics] non descending path problem (outline of non descending path problem | basic model of non descending path problem | non descending path problem expansion model 1 non origin starting poi
Why does the std:: string operation perform poorly- Why do std::string operations perform poorly?
How to set up SVN server on this machine
[redis foundation] understand redis persistence mechanism together (rdb+aof graphic explanation)
How can technology managers quickly improve leadership?
Batch files: list all files in a directory with relative paths - batch files: list all files in a directory with relative paths
程序猿如何快速成长
Develop team OKR in the way of "crowdfunding"
"Remake Apple product UI with Android" (3) - elegant statistical chart
Unreal_DataTable 实现Id自增与设置RowName
[redis foundation] understand redis master-slave architecture, sentinel mode and cluster together (Demo detailed explanation)
LeetCode1491. Average value of wages after removing the minimum wage and the maximum wage
Expression of request header in different countries and languages