我们需要对APP进行monkey测试,手动太麻烦了,为啥我们不让它自动运行呢?这里教你几招诀窍!
一插件安装
1、添加插件:Android Emulator Plugin,会自动下载如下插件:
2、安装成功后,增加构建步骤中多出如下选项:
二 配置模拟器前提:设置android SDK root
1、此处有三种方式:Jenkins配置新的模拟器、jenkins添加已有的模拟器、使用真机
jenkins添加已有的模拟器:
Jenkins配置新的模拟器:
job-构建环境中选择Run an Android emulator during build配置模拟器
2、在增加构建操作中添加“Run Android monkey tester”
三进行monkey测试
常见问题:
1、无法执行adb命令
解决:Jenkins服务里面配置高级管理员登录;
2、模拟器报错
Starting emulator for AVD ‘test001’
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: Please disable Hyper-V before using the Android Emulator. Start a command prompt as Administrator, run ‘bcdedit /set hypervisorlaunchtype off’, reboot.
解决:在SDK的Extras部分,勾选安装Intel X86 Emulator Accelerator(HAXM Installer)
链接:https://blog.csdn.net/weixin_44275820/article/details/107361046
本文为51Testing经授权转载,转载文章所包含的文字来源于作者。如因内容或版权等问题,请联系51Testing进行删除
推荐阅读点击阅读☞方法总比问题多,这回先从Monkey测试开始吧!
点击阅读☞Android环境搭建及Monkey入门
点击阅读☞告诉你个秘密,想偷懒就自己做个Jenkins Job!
点击阅读☞Newman+Jenkins实现接口自动化测试就是这么简单!
点击阅读☞想知道如何用Jenkins自动执行Python脚本输出测试报告?
戳