This article is from the official account of the project: “AirtestProject” Copyright notice: It is allowed to be reproduced, but the original link must be retained. Do not use it for commercial or illegal purposes

preface

Every day, many new people learn to use our Airtest and POCO framework to automate testing. But the novice inevitably raises a lot of questions:

For example, can I use these two frameworks to meet the needs of my testing work; Are there any tutorials to follow? Where can I find some script demos? Can not solve the problem encountered how to do…

Therefore, we have specially written this beginner’s guide, hoping to help you better understand and learn these two automated testing frameworks, easy to start automated testing.

Airtest

Airtest is a Python based, cross-platform UI automation testing framework. Because it’s based on image recognition, it works with all Android, iOS and Windows apps. Therefore, you can use the Airtest framework for any app or game on your mobile phone, or any app or game on your Windows PC, etc.

With Airtest, we can use various screenshots to simulate input on the device and complete automated test scripts:

Poco

Poco is a UI control-based search automation framework that is essentially a Python third-party library.

Currently, poCO can be used directly, except for android native apps. Other platforms need to access pocoSDK through corresponding methods before they can use the POCO framework.

The platforms we support now include Android, iOS, CoCOS-Creator, CoCOS2DX-JS, Cocos2DX-Lua, UE4, Unity3D, Egret, WeChat Applet&webview, Netease; Windows and MacOS are not supported.

For the corresponding access documents and precautions, please refer to “Platforms supported by POCO” on our official documentation website.

AirtestIDE

AirtestIDE is a cross-platform UI automation test editor tailored to both of these frameworks. So we highly recommend that newbies learn Airtest and POCO from the AirtestIDE.

To download the AirtestIDE: airtest.netease.com/. The editor runs on the following platforms:

How to Get started

For starters, we highly recommend using the AirtestIDE to help you write automated test scripts. Once you’re comfortable with Airtest and POCO, you can try running test scripts outside the IDE if you need to, such as on the local command line, pyCharm, and so on.

So first, you need to be on your computer to download the corresponding AirtestIDE, detailed AirtestIDE installation and start-up method can refer to the official document: airtest.doc.io.netease.com/IDEdocs/get… .

After successfully open the IDE, you need on the window of the IDE devices connected your test equipment, regardless of is ZhuoZhen machine, android simulator, iOS true or Windows, can be found on the official tutorial document airtest.doc.io.netease.com/ corresponding tutorials.

Using the Airtest helper window on the left side of the IDE interface, we can perform some simulation operations on connected devices, such as clicking, swiping, taking screenshots, holding down, entering text, and so on.

With the POCO helper window, we can see the DEVICE’s UI tree, and then we can select a UI control and perform various operations on that selected control.

Special note: Since both Airtest and POCO are based on Python syntax, we should write test scripts that conform to Python syntax.

We suggest that beginners who do not know Python can find some Python tutorials on the Internet to learn. Basically, they can learn some basic syntax, variables, conditional statements and loop statements to meet their initial learning needs. More advanced Python syntax can be learned at a later time.

How to find information

① Latest official documents

At present our latest official documentation Airtest Project Docs address is: airtest.doc.io.netease.com/.

Here you can see detailed tutorials on Airtest, POCO and AirtestIDE; You can also see common problems with the two automated testing frameworks and some of the script demos we presented:

In the blog, we will regularly update some advanced tutorials and practical examples for you to follow. This blog post is from our official account “AirtestProject”.

② Query the API of various methods

If you want to look up the detailed usage of a method, or to see its source code, you can find it in the Airtest and POCO project documentation:

Airtest project documentation for: Airtest. Readthedocs. IO/zh_CN/lates…

IO /zh_CN/lates…

③ Official official account “AirtestProject”

In the public menu of the past tutorial, you can view some advanced tutorials, practical examples and FAQs:

Our official official account qr code:

How to ask questions

View the corresponding tutorial

For the novice, it is inevitable to encounter all kinds of problems. Device not connected? Script running error? .

For most of the frequently asked questions, we’ve collected them in our official documentation:

(1) the android device to connect common problems can view: airtest.doc.io.netease.com/IDEdocs/dev…

② Common problems in script operation can be the corresponding part of the official document or the q&A series tutorial of the public number

Ask questions in a networking group

In addition, we also have a developer communication group where you can talk to each other about automated testing:

Now group 1 is full, you can join group 2 (QQ1017250147).

Note: it is best to attach the device details and IDE version when asking questions, and then post a log picture of the error, so that the group administrator can quickly locate the problem.

Questions specification: airtest.doc.io.netease.com/IDEdocs/get…

Leave a message on the official account

Some users will leave questions on our official account, of course, it is also ok; Within working days, we will have a dedicated staff to reply, but there is no guarantee of effectiveness.

Therefore, we recommend you to query our questions documents, or directly add to the group to ask questions; There are not only project managers in the group, but also many enthusiastic leaders who can help you solve problems.

Make an issue on GitHub

If you find bugs in the process of using, or have suggestions you want to make to us, you can go to the GitHub address of our project and send us an issue: github.com/AirtestProj… . This way you’ll be notified when bugs are resolved or suggestions are adopted.


Airtest website: airtest.netease.com/ Airtest tutorial website: airtest.doc.io.netease.com/ build enterprise private cloud service: airlab.163.com/b2b

Follow the public account below, you can view more past tutorials; Join our official test development forum by replying to “Forum”