Voltar ao ranking

AirtestProject/Airtest

Pythonairtest.netease.com

UI Automation Framework for Games and Apps

automated-testinggameunity3dandroidautomationtest-automationtest-frameworkioswindows
Crescimento de estrelas
Estrelas
9.5k
Forks
1.4k
Crescimento semanal
Issues
464
5k
jan. de 2018nov. de 2020set. de 2023jul. de 2026
ArtefatosPyPIpip install airtest
README

Airtest · Build status

Cross-Platform UI Automation Framework for Games and Apps

跨平台的UI自动化框架,适用于游戏和App中文版点这里

image

Features

  • Write Once, Run Anywhere: Airtest provides cross-platform APIs, including app installation, simulated input, assertion and so forth. Airtest uses image recognition technology to locate UI elements so that you can automate games and apps without injecting any code.

  • Fully Scalable: Airtest cases can be easily run on large device farms, using commandline or python API. HTML reports with detailed info and screen recording allow you to quickly locate failure points. NetEase builds Airlab on top of the Airtest Project.

  • AirtestIDE: AirtestIDE is an out of the box GUI tool that helps to create and run cases in a user-friendly way. AirtestIDE supports a complete automation workflow: create -> run -> report.

  • Poco: Poco adds the ability to directly access object(UI widget) hierarchy across the major platforms and game engines. It allows writing instructions in Python, to achieve more advanced automation.

Get started from airtest homepage

Supported Platforms

Installation

Use pip to install the Airtest python library.

pip install -U airtest

On MacOS/Linux platform, you need to grant adb execute permission.

# for mac
cd {your_python_path}/site-packages/airtest/core/android/static/adb/mac
# for linux
# cd {your_python_path}/site-packages/airtest/core/android/static/adb/linux
chmod +x adb

Download AirtestIDE from our homepage if you need to use the GUI tool.

Documentation

You can find the complete Airtest documentation on readthedocs.

Examples

Airtest aims at providing platform-independent API so that you can write automated cases once and run it on multiple devices and platforms.

  1. Using connect_device API you can connect to any android/iOS device or windows application.
  2. Then perform simulated input to automate your game or app.
  3. DO NOT forget to make assertions of the expected result.
from airtest.core.api import *

# connect an android phone with adb
init_device("Android")
# or use connect_device api
# connect_device("Android:///")

install("path/to/your/apk")
start_app("package_name_of_your_apk")
touch(Template("image_of_a_button.png"))
swipe(Template("slide_start.png"), Template("slide_end.png"))
assert_exists(Template("success.png"))
keyevent("BACK")
home()
uninstall("package_name_of_your_apk")

For more detailed info, please refer to Airtest Python API reference or take a look at API code

Running .air cases from CLI

Using AirtestIDE, you can easily create automated cases as .air directories. Airtest CLI provides the possibility to execute cases on different host machines and target device platforms without using AirtestIDE itself.

# run cases targeting on Android phone connected to your host machine via ADB
airtest run "path to your .air dir" --device Android:///

# run cases targeting on Windows application whose title matches Unity.*
airtest run "path to your .air dir" --device "Windows:///?title_re=Unity.*"

# generate HTML report after running cases
airtest report "path to your .air dir"

# or use as a python module
python -m airtest run "path to your .air dir" --device Android:///

Try running provided example case: airtest/playground/test_blackjack.air and see Usage of CLI. Here is a multi-device runner sample.

Contribution

Pull requests are very welcome.

Thanks

Thanks for all these great works that make this project better.

Repositórios relacionados
nightwatchjs/nightwatch

Integrated end-to-end testing framework written in Node.js and using W3C Webdriver API. Developed at @browserstack

JavaScriptnpmMIT Licensenightwatchjavascript
nightwatchjs.org
12k1.4k
karatelabs/karate

Test Automation Made Simple

JavaMavenMIT Licensetest-automationassertions
docs.karatelabs.io
8.9k2k
alipay/SoloPi

SoloPi 自动化测试工具

JavaMavenApache License 2.0mobile-testingui-testing
6.2k1.3k
pa11y/pa11y

Pa11y is your automated accessibility testing pal

JavaScriptnpmGNU Lesser General Public License v3.0a11yaccessibility
pa11y.org
4.5k295
reportportal/reportportal

Main Repository. ReportPortal starts here - see readme below.

MakefileApache License 2.0automationautomated-testing
reportportal.io
2k502
AirtestProject/Poco

A cross-engine test automation framework based on UI inspection

PythonPyPIApache License 2.0automated-testinggame
airtest.netease.com
1.9k340
stepci/stepci

Automated API Testing and Quality Assurance

TypeScriptnpmMozilla Public License 2.0api-restapi-testing
stepci.com
1.9k96
Pythagora-io/pythagora

Generate automated tests for your Node.js app via LLMs without developers having to write a single line of code.

JavaScriptnpmApache License 2.0api-testingapi-testing-framework
pythagora.ai
1.8k115
qu-niao/LimApiTest

由全网6W+粉丝、华为及阿里云测试专家认证博主开发及蚂蚁金服高级测开担任顾问推出的轻量级接口测试平台。Lim是Less is More(少即是多)的缩写,正如它的名字我们希望在开展接口测试时能够“四两拨千斤”!让用户操作更少但开展建设的效率更高。因此我们做了许多交互细节上的优化和创新以及一些大胆的设计。快来试试吧!

TypeScriptnpmApache License 2.0apitestplatform
qu-niao.gitee.io/lim-doc/
1.2k249
testsigmahq/testsigma

Testsigma is an agentic test automation platform powered by AI-coworkers that work alongside QA teams to simplify testing, accelerate releases and improve quality across web, mobile, desktop, API, and applications like Salesforce and SAP.

JavaMavenApache License 2.0testing-toolsautomation
testsigma.com
1.2k259
yanchunhuo/AutomationTest

自动化测试框架,支持接口自动化、WEB UI自动化、APP UI自动化、性能测试;支持多系统相互调用;支持接口与UI相互调用;支持dubbo接口调用

PythonPyPIautomated-testingselenium
1.2k381
pdevito3/craftsman

A .NET scaffolding tool to help you stop worrying about boilerplate and focus on your business logic 🚀

C#MIT Licenseweb-apidotnet-core
wrapt.dev
1.2k73