Skip to main content

A robust, object-oriented, multi-process mobile app control framework based on AirTest, designed for stable and compatible debugging and automation of devices and apps. Ideal for tasks such as game automation in titles like Honor of Kings, with enhanced stability features including connection checks, automatic retries on failure, and automatic restarts for continuous operation.

Project description

AirTest Mobile Automation

AirTest Mobile Automation is an object-oriented, multi-process control framework for mobile apps based on the AirTest framework. It is designed for stability and compatibility, making it ideal for automating tasks in games like Honor of Kings.

Features

  • Enhanced Stability: This framework enhances the reliability of testing and automation by implementing rigorous connection status checks and intelligent automatic reconnection mechanisms. Instead of throwing errors upon failure, it encapsulates AirTest functions to attempt reconnections, ensuring continuous operation even in the face of transient network issues or screenshot retrieval failures. In rare cases, such as with iOS devices, it may prompt for a physical reconnect of the device to be recognized by tidevice list. Additionally, it addresses and corrects issues with the start_app function that could occur on certain Android systems, providing a smoother and more resilient automation experience.
  • Automated Operation: Capable of fully automated processes with unattended operation. In case of errors, it automatically restarts the app or the control endpoint, such as Docker or an Android emulator.
  • Time Management: Utilizes the UTC/GMT+08:00 time zone for task scheduling aligned with Chinese game refresh cycles.
  • Formatted Output: Displays information in a formatted manner, e.g., [MM-DD HH:MM:SS] info.

Modules

Device Management ( deviceOB )

Handles device management in an object-oriented approach, supporting various clients and control endpoints.

Clients Control Endpoints Management Capabilities
BlueStacks / LDPlayer/ MuMu Windows Start, stop, and restart emulators
Docker Linux Start, stop, and restart containers
iOS Mac Reconnect with tidevice, restart iOS
USB-connected Android phones ALL Reboot Android system
WIFI-connected phones ALL Hot reboot Android system

APP Management ( appOB )

Manages the opening, stopping, and restarting of apps.

Tools ( DQWheel )

  • A utility for multi-process support based on the file system, including synchronization, broadcasting, file management, and enhanced time management.
  • Utilizes files and dictionaries to store and retrieve image coordinates, reducing the time to locate element coordinates repeatedly. It also allows for selecting specific positions, such as the least proficient hero in Honor of Kings based on proficiency.

Development Examples

Below are some examples of development scripts that demonstrate the capabilities of the project.

For the configuration file format, see this guide.

Acknowledgements

The historical versions of this script, namely WZRY_AirtestIDE_XiaoMi11@cndaqiang, WZRY_AirtestIDE_emulator@cndaqiang, and WZRY@cndaqiang have also been instrumental in the development process.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright

© 2024 cndaqiang. All rights reserved.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airtest_mobileauto-2.2.0.1.tar.gz (56.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

airtest_mobileauto-2.2.0.1-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

Details for the file airtest_mobileauto-2.2.0.1.tar.gz.

File metadata

  • Download URL: airtest_mobileauto-2.2.0.1.tar.gz
  • Upload date:
  • Size: 56.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for airtest_mobileauto-2.2.0.1.tar.gz
Algorithm Hash digest
SHA256 204ae737a0362a56b1a17ab9c8a14b6b5ce7a49831515fa7569186519d244b4b
MD5 e4609a6221843912b048e5da1e0b8c0d
BLAKE2b-256 e90b21001e1f17794d127b31695cc9f7efd4ef55a4a87a23e657b7323a9f659d

See more details on using hashes here.

File details

Details for the file airtest_mobileauto-2.2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for airtest_mobileauto-2.2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 671ec41377c9539b0c40358825f5cc8116e9841b0d585f37cb8226ec55f5724f
MD5 477a6d474c568a41f88085a8c41119b0
BLAKE2b-256 6796a237ed52ac770d5bb989b0098fe6d40a82b1f7ed5bfc908c61b1fca7c30f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page