同步操作将从 AirtestProject/Airtest 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
UI Test Automation Framework for Games and Apps
跨平台的UI自动化测试框架,适用于游戏和App (中文版点这里)
Airtest is a cross-platform automated testing framework focused mainly on games, but can also be used for native apps. Windows and Android are currently supported. iOS support will be coming in the near future.
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 test on games without injecting any code. The test will generate an HTML report, which allows you to quickly locate failed test points.
AirtestIDE is an out of the box GUI tool that helps to create and
record test cases in the user-friendly way. AirtestIDE provides QA with
a complate production workflow: record -> replay -> report
Get Started from Airtest Project Homepage
Use pip to install Airtest python library.
pip install airtest
Download AirtestIDE from our homepage if you need to use the GUI tool.
You can find the complete airtest documentation on readthedocs.
Airtest aims at providing platform independent API, so that you can write test once and run test on different devices.
from airtest.core.api import *
# connect an android phone with adb
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
.air
from CLIUsing AirtestIDE, you can easily create and author automated tests as .air
directories.
Airtest CLI provides the possibility to execute tests on different host machine and target device platforms without using AirtestIDE itself.
python -m airtest run <path to your air dir> --device Android:///
python -m airtest run <path to your air dir> --device Windows:///?title_re=Unity.*
Try running provided test case: airtest/playground/test_blackjack.air
and see Usage of CLI.
Pull requests are very welcome.
Thanks for all these great works that make this project better.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。