博客
关于我
超容易!一文掌握airtest自动化测试工具
阅读量:83 次
发布时间:2019-02-26

本文共 1589 字,大约阅读时间需要 5 分钟。

??Airtest??

??????????????????????????????????????Airtest???UI???????????????????????????Airtest???????????

??????????

?????????????????????????????????????????????????????????????????????????????

??Airtest???

??????UI??????????Airtest??????? 1. **??????**?????????????????????????????????????? 2. **????**??????????????????????????????????? 3. **????**?AirtestIDE???????????????????????????????????

??????

AirtestIDE?????????????????????????????? 1. ??Airtest???http://airtest.netease.com/???????Airtest??? 2. ????? - ????????????USB??? - Airtest??ADB???????????????????`adb devices`?????? 3. ??AirtestIDE??????????????

????????

?????????????????? - **??**?????????????? - **????**???`touch`?????????`sleep`??????? - **??**???`assert_exists`?????????`keyevent`???????

????????????

??????????????debug???????????????????????????? - debugmm.qq.com/?forcex5=true - debugtbs.qq.com - debugx5.qq.com?????????

????Python??Airtest??

Airtest????Python???????Python 3.5??????????????? 1. ??Python???????? 2. ??pip?????? ```bash pip install airtest pip install pocoui ``` 3. ??PyCharm????????????

??????????

from airtest.core.api import *  
# ????
connect_device("Android:///")
# ????
start_app("com.pingan.certicationApp")
# ??????
touch(Template("image_of_a_button.png"))
# ????
swipe(Template("slide_start.png"), Template("slide_end.png"))
# ??
assert_exists(Template("success.png"))
# ????Home???
keyevent("BACK")
home()
# ????
uninstall("package_name_of_your_apk")

????????

??AllReportStartCMD.py???????????????????????????Jenkins??????????????????

??

????????????????????????????

转载地址:http://yyik.baihongyu.com/

你可能感兴趣的文章
Nodejs简介以及Windows上安装Nodejs
查看>>
nodejs系列之express
查看>>
nodejs系列之Koa2
查看>>
Nodejs连接mysql
查看>>
nodejs连接mysql
查看>>
NodeJs连接Oracle数据库
查看>>
nodejs配置express服务器,运行自动打开浏览器
查看>>
NodeMCU教程 http请求获取Json中文乱码解决方案
查看>>
Nodemon 深入解析与使用
查看>>
NodeSession:高效且灵活的Node.js会话管理工具
查看>>
node~ http缓存
查看>>
node不是内部命令时配置node环境变量
查看>>
node中fs模块之文件操作
查看>>
Node中同步与异步的方式读取文件
查看>>
node中的get请求和post请求的不同操作【node学习第五篇】
查看>>
Node中的Http模块和Url模块的使用
查看>>
Node中自启动工具supervisor的使用
查看>>
Node入门之创建第一个HelloNode
查看>>
node全局对象 文件系统
查看>>
Node出错导致运行崩溃的解决方案
查看>>