当前位置:网站首页>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
边栏推荐
- Svn usage specification
- MongoDB 的安装和基本操作
- 【Proteus仿真】74HC595+74LS154驱动显示16X16点阵
- Asemi rectifier bridge umb10f parameters, umb10f specifications, umb10f package
- SVN使用规范
- pycharm错Error updating package list: connect timed out
- AcWing 第58 场周赛
- Effect of ARP package on FTP dump under vxworks-6.6 system
- Develop team OKR in the way of "crowdfunding"
- Rk3399 platform development series explanation (WiFi) 5.54. What is WiFi wireless LAN
猜你喜欢
![[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](/img/81/59ed6bebf5d85e9eb71bd4ca261309.jpg)
[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

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

The difference between calling by value and simulating calling by reference

Remote file contains actual operation
![[solved] access denied for user 'root' @ 'localhost' (using password: yes)](/img/71/1ff8ed1d773da99054310f96dca3f8.jpg)
[solved] access denied for user 'root' @ 'localhost' (using password: yes)

8个酷炫可视化图表,快速写出老板爱看的可视化分析报告

The mixlab editing team is recruiting teammates~~

Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (III)

From "zero sum game" to "positive sum game", PAAS triggered the third wave of cloud computing

【LeetCode】94. Middle order traversal of binary tree
随机推荐
One article takes you to understand machine learning
记一次jar包冲突解决过程
Why does the std:: string operation perform poorly- Why do std::string operations perform poorly?
Pandora IOT development board learning (HAL Library) - Experiment 5 external interrupt experiment (learning notes)
Caching mechanism of Hibernate / session level caching mechanism
[web security] - [SQL injection] - error detection injection
Pointcut expression
疫情常态化大背景下,关于远程办公的思考|社区征文
Mixlab编辑团队招募队友啦~~
Qt插件之自定义插件构建和使用
Cocos Creator 2.x 自动打包(构建 + 编译)
"Everyday Mathematics" serial 56: February 25
Redis installation under windows and Linux systems
App mobile terminal test [4] APK operation
SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]
June to - -------
Embedded development: seven reasons to avoid open source software
跟我学企业级flutter项目:简化框架demo参考
Using optimistic lock and pessimistic lock in MySQL to realize distributed lock
Record windows10 installation tensorflow-gpu2.4.0