Introduction

The original intention of our Airtest Project was born out of our passion for the game automation testing framework. Compared to ordinary software testing, mobile game testing has a high demand for performance testing and compatibility testing due to the large number of mobile phone models, and there may be a lot of repetitive content such as new processes that needs to be tested repeatedly. To a certain extent, automated testing can reduce the burden on testers, shorten the bug discovery cycle, and improve test efficiency.

However, the automated testing of mobile games has always been a difficult problem in the industry. Because the game scene is complex, the content is random, and the interface is iterative. The most important thing is that the game engine used by everyone is very diverse. It is not easy to do automated testing of mobile games.

In order to lower the threshold of automated testing, produce more efficient automated scripts with less effort and improving testing efficiency, we have launched a complete solution called Airtest Project

With the continuous development of our project, we found that in addition to its very good performance in game testing, it can be easily extended to more platforms and more engines. At the beginning we only used Android phones to test the games. Now we can test games and other kind of applications on Windows and iOS. We have seen the huge potential and demands of this project, so we decided to open source the project and share it with everyone, we hope to have more people to use and improve this project collectively.

Prerequirements

Airtest Project Getting started is easy, but not without prerequirements, we hope that you can:

  • Have some initial understanding of automated testing, and some code base
  • Understand Python’s basic syntax, as our script is based on Python, and you may need to learn some Python grammar in advance.
  • Prepare an integrated development environment, which can be our AirtestIDE, or any code editor you like, such as Sublime, Pycharm, etc. In our series of tutorials, in order to facilitate the display, usually AirtestIDE is used, which has some custom-made features for our project, which will let you get started faster.
  • A game or app that you want to test
  • Before reading the series of tutorials, is strongly recommended to read the official website 5 minutes quick start tutorial, to have a general understing of the use of Airtest Project

Glossary

The core members of our Airtest Project are the two frameworks Airtest and Poco, which are third-party libraries of Python, so the scripts written using our tools are essentially normal Python scripts, you can freely introduce other Python libraries according to your needs.

Among them:

  • Airtest is a cross-platform, image recognition-based UI automation testing framework for games and apps. Support Windows, Android and iOS platforms.
  • Poco is an automated testing framework based on UI control recognition, currently supports Unity3D/cocos2dx-*/Android native app/iOS native app/WeChat Small procedures, it can also be accessed by using poco-sdk on other engines.
  • AirtestIDE is a cross-platform UI automation test editor that we support, with built-in plug-in functions for Airtest and Poco. Use it to write scripts quickly and easily.

For specific usage, please refer to the tutorials and documentation.

Tutorial index

In order to facilitate everyone to get started quickly, we provide the following simple tutorials based on the most common usage scenarios:

Please read the tutorial carefully before writing your script. At the same time, in our How to write your first game test script, we also have a basic introduction of the Airtest and Poco frameworks to get started. Reading it in advance may allow you to take fewer detours.

If your script involves both game testing and Android phone-related operations (such as ADB command calls), you can also refer to How to write your first game test script and Test on Android phone.