{"id":14960394,"url":"https://github.com/airtestproject/airtest","last_synced_at":"2025-05-12T13:16:40.794Z","repository":{"id":37734371,"uuid":"118709540","full_name":"AirtestProject/Airtest","owner":"AirtestProject","description":"UI Automation Framework for Games and Apps","archived":false,"fork":false,"pushed_at":"2024-10-09T04:15:02.000Z","size":307265,"stargazers_count":8642,"open_issues_count":452,"forks_count":1336,"subscribers_count":211,"default_branch":"master","last_synced_at":"2025-05-12T13:16:02.020Z","etag":null,"topics":["android","automated-testing","automation","game","ios","test-automation","test-framework","unity3d","windows"],"latest_commit_sha":null,"homepage":"http://airtest.netease.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AirtestProject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-24T04:00:35.000Z","updated_at":"2025-05-12T09:19:27.000Z","dependencies_parsed_at":"2024-10-28T17:07:03.458Z","dependency_job_id":null,"html_url":"https://github.com/AirtestProject/Airtest","commit_stats":{"total_commits":873,"total_committers":64,"mean_commits":13.640625,"dds":0.56815578465063,"last_synced_commit":"79d87cc9c16ffdb59904179ccd752e00dcf5205a"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AirtestProject%2FAirtest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AirtestProject%2FAirtest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AirtestProject%2FAirtest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AirtestProject%2FAirtest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AirtestProject","download_url":"https://codeload.github.com/AirtestProject/Airtest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745196,"owners_count":21957319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","automated-testing","automation","game","ios","test-automation","test-framework","unity3d","windows"],"created_at":"2024-09-24T13:22:11.111Z","updated_at":"2025-05-12T13:16:40.746Z","avatar_url":"https://github.com/AirtestProject.png","language":"Python","readme":"# Airtest \u0026middot; [![Build status](https://travis-ci.org/AirtestProject/Airtest.svg?branch=master)](https://travis-ci.org/AirtestProject/Airtest)\n\n**Cross-Platform UI Automation Framework for Games and Apps**\n\n**跨平台的UI自动化框架，适用于游戏和App** （[中文版点这里](./README_zh.md)）\n\n\n![image](./demo.gif)\n\n\n## Features\n\n*   **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. \n\n*   **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](https://airlab.163.com/) on top of the Airtest Project.\n\n*   **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 -\u003e run -\u003e report``.\n\n*   **Poco:** [Poco](https://github.com/AirtestProject/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.\n\nGet started from [airtest homepage](http://airtest.netease.com/)\n\n#### [Supported Platforms](./docs/wiki/device/platforms.md)\n\n\n## Installation\n\nUse `pip` to install the Airtest python library. \n\n```Shell\npip install -U airtest\n```\n\nOn MacOS/Linux platform, you need to grant adb execute permission.\n\n```Shell\n# for mac\ncd {your_python_path}/site-packages/airtest/core/android/static/adb/mac\n# for linux\n# cd {your_python_path}/site-packages/airtest/core/android/static/adb/linux\nchmod +x adb\n```\n\nDownload AirtestIDE from our [homepage](http://airtest.netease.com/) if you need to use the GUI tool.\n\n\n## Documentation\n\nYou can find the complete Airtest documentation on [readthedocs](http://airtest.readthedocs.io/).\n\n\n## Examples\n\nAirtest aims at providing platform-independent API so that you can write automated cases once and run it on multiple devices and platforms.\n\n1. Using [connect_device](http://airtest.readthedocs.io/en/latest/README_MORE.html#connect-device) API you can connect to any android/iOS device or windows application.\n1. Then perform [simulated input](http://airtest.readthedocs.io/en/latest/README_MORE.html#simulate-input) to automate your game or app.\n1. **DO NOT** forget to [make assertions](http://airtest.readthedocs.io/en/latest/README_MORE.html#make-assertion) of the expected result. \n\n```Python\nfrom airtest.core.api import *\n\n# connect an android phone with adb\ninit_device(\"Android\")\n# or use connect_device api\n# connect_device(\"Android:///\")\n\ninstall(\"path/to/your/apk\")\nstart_app(\"package_name_of_your_apk\")\ntouch(Template(\"image_of_a_button.png\"))\nswipe(Template(\"slide_start.png\"), Template(\"slide_end.png\"))\nassert_exists(Template(\"success.png\"))\nkeyevent(\"BACK\")\nhome()\nuninstall(\"package_name_of_your_apk\")\n```\n\nFor more detailed info, please refer to [Airtest Python API reference](http://airtest.readthedocs.io/en/latest/all_module/airtest.core.api.html) or take a look at [API code](./airtest/core/api.py)\n\n\n## Running ``.air`` cases from CLI\n\nUsing AirtestIDE, you can easily create automated cases as ``.air`` directories.\nAirtest CLI provides the possibility to execute cases on different host machines and target device platforms without using AirtestIDE itself.\n\n```Shell\n# run cases targeting on Android phone connected to your host machine via ADB\nairtest run \"path to your .air dir\" --device Android:///\n\n# run cases targeting on Windows application whose title matches Unity.*\nairtest run \"path to your .air dir\" --device \"Windows:///?title_re=Unity.*\"\n\n# generate HTML report after running cases\nairtest report \"path to your .air dir\"\n\n# or use as a python module\npython -m airtest run \"path to your .air dir\" --device Android:///\n```\n\nTry running provided example case: [``airtest/playground/test_blackjack.air``](./playground/test_blackjack.air) and see [Usage of CLI](http://airtest.readthedocs.io/en/latest/README_MORE.html#running-air-from-cli). Here is a [multi-device runner sample](https://github.com/AirtestProject/multi-device-runner).\n\n\n## Contribution\n\nPull requests are very welcome. \n\n\n## Thanks\n\nThanks for all these great works that make this project better.\n\n- [stf](https://github.com/openstf)\n- [atx](https://github.com/NetEaseGame/ATX)\n- [pywinauto](https://github.com/pywinauto/pywinauto)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairtestproject%2Fairtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fairtestproject%2Fairtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairtestproject%2Fairtest/lists"}