当前位置:网站首页>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
边栏推荐
- PHP CI (CodeIgniter) log level setting
- Getting started with Message Oriented Middleware
- 在ntpdate同步时间的时候出现“the NTP socket is in use, exiting”
- 关于视觉SLAM的最先进技术的调查-A survey of state-of-the-art on visual SLAM
- From the 18th line to the first line, the new story of the network security industry
- Colab works with Google cloud disk
- 0214-27100 a day with little fluctuation
- Mb10m-asemi rectifier bridge mb10m
- 程序猿如何快速成长
- Deep understanding of grouping sets statements in SQL
猜你喜欢
Myopia: take off or match glasses? These problems must be understood clearly first
Initial test of scikit learn Library
消息队列消息丢失和消息重复发送的处理策略
App mobile terminal test [3] ADB command
App mobile terminal test [4] APK operation
Interviewer: how does the JVM allocate and recycle off heap memory
How to use AAB to APK and APK to AAB of Google play apps on the shelves
Project -- high concurrency memory pool
Mongodb installation and basic operation
Colab works with Google cloud disk
随机推荐
Record a jar package conflict resolution process
[combinatorics] combinatorial identities (review of eight combinatorial identities | product of combinatorial identities 1 | proof | use scenario | general method for finding combinatorial numbers)
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
"Remake Apple product UI with Android" (3) - elegant statistical chart
Golang 匿名函数使用
MongoDB 的安装和基本操作
nifi从入门到实战(保姆级教程)——flow
Getting started with Message Oriented Middleware
一台服务器最大并发 tcp 连接数多少?65535?
Google Earth engine (GEE) - daymet v4: daily surface weather data set (1000m resolution) including data acquisition methods for each day
Mongodb installation and basic operation
Unity项目优化案例一
[web security] - [SQL injection] - error detection injection
Top k questions of interview
Uploads labs range (with source code analysis) (under update)
The mixlab editing team is recruiting teammates~~
Effect of ARP package on FTP dump under vxworks-6.6 system
Low level version of drawing interface (explain each step in detail)
Nifi from introduction to practice (nanny level tutorial) - flow
消息队列消息丢失和消息重复发送的处理策略