Skip to content

Beginner's Guide for Newcomers

1.Preface

Every day, many newcomers start learning to use our Airtest 和 poco frameworks for automated testing. However, newcomers are inevitably going to have many questions. For example, can these two frameworks meet my testing needs? Is there any tutorial I can refer to? Where can I find some script demos? What can I do if I encounter problems that I can't solve... Therefore, we have created this beginner's guide specifically to help everyone better understand these two automation testing frameworks, and to easily get started with automation testing.

1) Airtest

Airtest is a Python-based, cross-platform UI automation testing framework. Because it is based on the principle of image recognition, it is suitable for all Android, iOS, and Windows applications. Therefore, no matter it is an app or game on a mobile phone, or a Windows computer, Airtest framework can handle that. With the help of Airtest, we can simulate input on devices through various screenshots and complete automation testing scripts.

image

2) Poco

Poco is an automation framework based on UI controls search, and fundamentally it is also a third-party python library.

image

Currently, besides the native Android and iOS applications, Poco can be directly used. Other platforms require corresponding methods to access the Poco SDK before using the Poco framework. The platforms we currently support include: Android, iOS, Cocos-Creator, Cocos2dx-js, Cocos2dx-lua, UE4, Unity3D, Egret, WeChat Applet & webview, Netease; Windows and MacOS are not supported. The corresponding access documents and precautions can be viewed on our official documentation website under the section 'Platforms supported by Poco'.

3) AirtestIDE

AirtestIDE is a cross-platform UI automation testing editor that is specifically designed for the Airtest and Poco automation testing frameworks. Therefore, we highly recommend beginners start learning Airtest and Poco from AirtestIDE. image

The official website for AirtestIDE is http://airtest.netease.com/. This editor can run on the following platforms:

image

2.How to get started

For beginners, we highly recommend using AirtestIDE to help you write automated test scripts. Once you become proficient in using Airtest and poco, if necessary, you can try running test scripts without the IDE, such as running them on the local command line, running them on other Python editors like Pycharm, and so on. So first of all, you need to download the corresponding AirtestIDE on your computer. You can refer to the official documentation for detailed instructions on how to install and launch AirtestIDE. After successfully opening the IDE, you need to connect your testing device to the device window in the IDE, no matter it is an Android mobile phone, an Android emulator, an iOS phone, or a Windows window. You can find corresponding tutorials on our official tutorial document at https://airtest.doc.io.netease.com/.

image-20211220173844568

With the help of the Airtest assistant window on the left side of the IDE interface, we can perform some simulated operations on the connected device, such as clicking, sliding, taking screenshots, long pressing, inputting text, and so on.

image

With the help of the poco assistant window, we can see the UI element tree of the device. Then, we can select a specific UI control and perform various operations on it.

image

Attention: Since Airtest and Poco are both based on Python syntax, the test scripts you write should comply with Python syntax. We suggest that beginners who do not understand Python can look for some Python tutorials online to learn. Learning some basic syntax, variables, conditional statements and loop statements can meet the initial needs. You can learn more advanced syntax related to Python when needed.

3.How to search for information

1) Search for the official tutorial documentation.

The current address for our latest official documentation, Airtest Project Docs, is https://airtest.doc.io.netease.com/. Here you can find detailed tutorials about Airtest, Poco, and AirtestIDE. You can also check out common problems encountered when using these automation testing frameworks, as well as some script demos we provide.

image-20211220163225591

And in our blog, we will regularly update some advanced tutorials and practical examples for everyone's convenience in learning; the original blog post comes from our official WeChat account "AirtestProject".

2) Search for the API documentation of the framework.

If you want to check the detailed usage of a certain method or view its source code, you can find it in the API documentation of Airtest and Poco.

3) Official Account: AirtestProject

In the past tutorials in the official account, you can find some advanced tutorials, practical examples, and tutorials on common problems. You can search for keywords in the account to find the tutorial you want to see. image-20210812114618851

Our official account QR code: image

4)Bilibili Account: Airtest酱

For colleagues who do not like to read documents, we also provide rich video tutorials, which are updated on our Bilibili account: Airtest酱. Currently, all the beginner-level courses of Airtest have been updated. Go check them!

image-20210812112416257

We will also update more tutorial videos in the future. Welcome to follow us and leave a like.

image-20210812112416257

4.How to ask questions when encountering problems.

1) View the corresponding tutorial.

"For beginners, it is inevitable to encounter various problems. such as can't connect to the device, or script running error... For most common issues, we have already collected and put them on our official documentation. ① Common connection issues for Android devices can be viewed in this document. ② Common issues with script running can be found in the official documentation or the Q&A tutorial series in the official account.

2)Ask questions in the official communication QQ group.

In addition, we also have a dedicated developer communication group for everyone to discuss automation testing-related issues with each other. Currently, group 1, 2, and 3 are full. You can join group 4 (QQ117973773). Note: When asking questions, it is best to include device details and IDE version used, and then attach a screenshot of the error log. This can help group administrators quickly locate the problem.

3)Submit a bug report on the official website.

We have set up a bug collection page for AirtestProject on our official website, and we hope that when colleagues encounter problems, they can provide us with detailed information so that we can quickly help them locate the problem.

4)Report an issue on GitHub

Colleagues can also directly create an issue on our project's GitHub address: https://github.com/AirtestProject/AirtestIDE/issues. This way, when a bug is resolved or a suggestion is adopted, you can receive notifications immediately.