In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to use Airtest automated testing tools in python, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The official website of Airtest introduces the composition of the project.
Airtest: a cross-platform UI automated testing framework based on image recognition, suitable for games and App, supporting platforms such as Windows, Android and iOS
Poco: an automated testing framework based on UI control identification. Currently, it supports native Unity3D/cocos2dx-*/Android app/iOS native app/ WeChat Mini Programs, and can also connect to poco-sdk in other engines to use.
Source code
AirtestIDE: a cross-platform UI automated test editor with built-in plug-ins for Airtest and Poco, you can use it to quickly and easily write Airtest and Poco code.
AirLab: real machine automated cloud testing platform, which currently provides TOP100 mobile phone compatibility testing, overseas cloud phone compatibility testing and other services. Please visit the official website to learn more.
How to get started?
The project is based on Python, so all scripts written are Python code, so it is recommended to learn the basic syntax of Python before using it.
When writing automated scripts, you can work with the official AirtestIDE editor to write scripts quickly.
Automated scripts, as well as Airtest and Poco, are based on Python, so you can also use your favorite Python editor to write scripts
I. installation
There are two ways to install Airtest. One is to download and install AirtestIDE, which comes with a python environment and an Airtest library. Support for visual selection component testing. The disadvantage is that the Python environment and third-party modules installed by yourself cannot be used in this IDE, so you can only reinstall the relevant modules.
In use, AirtestIDE is first installed, which can be downloaded and installed on the official website soon. Open IDE, on the left is the Airtest auxiliary window and Poco auxiliary window, Airtest auxiliary window can quickly complete the screenshot identification picture and click, slide and other operation code generation. The Poco auxiliary window can view the application control tree and quickly generate the code related to the operation of the application control. In the middle are code edit boxes and Log forms for editing code and viewing information such as output. On the right is the device window, which can be used for connection settings and device selection. When a device is selected, the device window on the right will become the current UI interface of the selected device. The IDE interface is shown in the following figure.
2. Use
You can learn from the introduction of the official website that Airtest uses the idea of graphical scripting language Sikuli. Users do not need to write the test code line by line, but generate the relevant operation code by screenshot (of course, those who are familiar with the relevant Api can also use handwritten code). The following figure shows a small Demo implemented by screenshot.
Official document: https://airtest.doc.io.netease.com/
Third, use in the local environment and problems encountered 1. Use "pip install airtest" for installation
The project supports Python (2.7 or
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.