当前位置:网站首页>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
边栏推荐
- pycharm错Error updating package list: connect timed out
- Thinking about telecommuting under the background of normalization of epidemic | community essay solicitation
- Cocos Creator 2. X automatic packaging (build + compile)
- 无心剑中译泰戈尔《漂鸟集(1~10)》
- 0214-27100 a day with little fluctuation
- Golang decorator mode and its use in NSQ
- The difference between calling by value and simulating calling by reference
- TCP congestion control details | 3 design space
- Client does not support authentication protocol requested by server; consider upgrading MySQL client
- Record windows10 installation tensorflow-gpu2.4.0
猜你喜欢

Cocos Creator 2.x 自动打包(构建 + 编译)

Cocos Creator 2. X automatic packaging (build + compile)

关于视觉SLAM的最先进技术的调查-A survey of state-of-the-art on visual SLAM

Visual SLAM algorithms: a survey from 2010 to 2016

TCP拥塞控制详解 | 3. 设计空间

Q2 encryption market investment and financing report in 2022: gamefi becomes an investment keyword

Redis installation under windows and Linux systems

Record windows10 installation tensorflow-gpu2.4.0

ASEMI整流桥UMB10F参数,UMB10F规格,UMB10F封装

The accept attribute of the El upload upload component restricts the file type (detailed explanation of the case)
随机推荐
Visual SLAM algorithms: a survey from 2010 to 2016
2022 love analysis · panoramic report of digital manufacturers of state-owned enterprises
Threejs Part 2: vertex concept, geometry structure
One article takes you to understand machine learning
Is it safe to open a stock account by mobile registration? Does it need money to open an account
Is it safe to open an account with tongdaxin?
Top k questions of interview
First!! Is lancet hungry? Official documents
Why does the std:: string operation perform poorly- Why do std::string operations perform poorly?
8个酷炫可视化图表,快速写出老板爱看的可视化分析报告
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
PHP CI (CodeIgniter) log level setting
How to set up SVN server on this machine
记一次jar包冲突解决过程
Develop team OKR in the way of "crowdfunding"
[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
June to - -------
ThreeJS 第二篇:顶点概念、几何体结构
Qt插件之自定义插件构建和使用
Unreal_DataTable 实现Id自增与设置RowName