UI自动化测试工具AirTest学习笔记

一、简介

Airtest Project是有网易游戏内部工具团队开发并开元的一个UI自动化测试工具。

AirtestIDE是一个跨平台、多端(windows、web、Android、ios、游戏)的UI自动化测试编辑器。

支持基于图像识别的Airtest框架,适用于所有Android和Windows游戏。

支持基于UI控件搜索的Poco框架,适用于Unity3d、Cocos2d与Android、ios、web

二、环境搭建

(1)、下载AirtestIDE安装包,下载地址:http://airtest.netease.com/changelog.html,下载最新版本即可

(2)、启动,启动要求登录账号,直接skip即可

(3)、插上被测试机,在界面右侧选择设备ID,CONNECT

扫描二维码关注公众号,回复: 7577639 查看本文章

 (4)、左侧提供快捷操作栏,即可开始使用

二、工程步骤

(1)、安装python 并配置环境变量,工程使用python 2.7环境, 下载地址:https://www.python.org/downloads/release/python-2713/ 选择Windows x86-64 MSI installer ,安装时勾选上"pip"

(2)、安装python 并配置环境变量,工程使用python 2.7环境, 下载地址:https://www.python.org/downloads/release/python-2713/ 选择Windows x86-64 MSI installer ,安装时勾选上"pip"

检查python 是否安装成功,cmd 下执行命令:python --version pip --version
 

 (3)、adb环境:

完整版android sdk https://developer.android.google.cn/studio 下载sdk tools;并把platform-tools、tools加入环境变量;

(4)、安装airtest及pocoui,打开命令行输入命令

pip install airtest
python2.7下,numpy安装可能会有问题,可以手动安装pip install numpy==1.16.0
pip install pocoui
或者指定安装版本
pip install airtest==1.0.27
pip install pocoui==1.0.77
或者选择镜像地址安装
pip install numpy==1.16.0 -i https://pypi.douban.com/simple(若numpy安装出问题,手动指定安装版本)
pip install airtest==1.0.27 -i https://pypi.douban.com/simple
pip install pocoui==1.0.77 -i https://pypi.douban.com/simple
(5)、 python编辑器    破解教程: https://www.cnblogs.com/pupilheart/p/9734124.html
(6)、获取工程代码
新建文件夹,cmd 到该指定路径下 执行命令:t clone [email protected]:test_group/autotest/airtestUI.git

 

6、单步调试

在IDE中通过poco以及airtest获取元素,完成步骤调试

 

猜你喜欢

转载自www.cnblogs.com/guaijieya/p/11731315.html