Airtest 学习笔记一运行、查看报告

Airtest是网易游戏开源的一款自动化测试框架,基于Python脚本的方式,可用于web,Windows程序、APP自动化测试。

一、IDE运行

 二、还可用命令方式在命令窗口运行

点击运行按钮时,在log viewer窗口也可以看到运行时执行的命令,如下:

下面是对命令的详解:

1、运行

命令:

Airtest编译器位置 runner 运行脚本位置  --device android://安卓设备号 --log 输出log位置 -recording录屏

"D:\download\AirtestIDE-win-1.2.10\AirtestIDE\AirtestIDE" runner "C:\Users\EDZ\Desktop\work\Airtest program\crash plus.air"  --device android://127.0.0.1:5037/ae24d3c0?cap_method=JAVACAP&&ori_method=MINICAPORI&&touch_method=MAXTOUCH --log

"C:\Users\EDZ\Desktop\work\Airtest program\report\1"

参数说明:

run 后边接脚本路径

--device 手机设备,adbhost是adb server所在主机的ip(本地host为127.0.0.1),adb port默认是5037,serialno是android手机的序列号。更多adb的方面的内容请参考文档developer.google。

# 连接本机默认端口连的一台设备号为ae24d3c0?的手机:Android://127.0.0.1:5037/ae24d3c0?

--log  log输出目录

--recording 运行时录屏

2、查看报告

命令:
Airtest编译器位置 reporter Airtest脚本位置 --log_root 报告存储位置 --outfile html报告位置   --static_root 测试报告静态文件资源根目录 --lang zh设置中文 --plugin加载报告插件

D:\download\AirtestIDE-win-1.2.10\AirtestIDE\AirtestIDE reporter C:\Users\EDZ\Desktop\work\Airtest program\crash plus.air --log_root C:\Users\EDZ\Desktop\work\Airtest program\report\1 --outfile C:\Users\EDZ\Desktop\work\Airtest program\report\1\log.html --static_root D:\download\AirtestIDE-win-1.2.10\AirtestIDE\airtest\report --lang zh --plugin airtest_selenium.report poco.utils.airtest.report

参数说明:

reporter: 生成报告命令

--log_root:运行报告后的log截图,录屏根目录

--outfile :输出html测试报告文件

 --static_root:静态资源文件路径

--lang zh:语音设置,英文--en,中文--zh

--plugin:加载报告插件,selenium或poco插件

下面贴上官网:批量执行脚本 - Airtest Project Docs

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Tangcutudou

小白一枚,记录学习踩坑之路~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值