Jenkins系列之—22 Android Emulator Plugin插件

来源:互联网 发布:万方数据库文献检索 编辑:程序博客网 时间:2024/05/22 17:06

https://wiki.jenkins-ci.org/display/JENKINS/Android+Emulator+Plugin

In order to provide effective test coverage of the ever-increasing range of Android platform versions, screen resolutions and densities (amongst other device properties), automated and scalable build tools like Jenkins become highly advantageous.

This plugin aims to vastly simplify automated testing of Android applications across a wide range of emulated devices by automatically generating emulator instances, starting them up and capturing the logging output, with many device parameters being under your control.

从官网的插件介绍中可以得知 Android Emulator Plugin 可以自动建立,启动仿真器实例,运行Android App测试,并且输出log信息,你还可以根据自己的需求设定自己的控制参数。下面是简单个人使用介绍:

1、安装后在Manage Jenkins中设置你自己的android sdk的目录或设置让其自动安装sdk:

2、在project中可看到新增加的选项:

可以轻松的定制自己需要的emulator属性。

3、在build一项中可以看到新增的条目,添加后如下:

Create Android build file:  自动查找创建 android build file
Install Android package : 将apk 安装到 emulator中
Install Android project prerequisites: 最好在编译每个android项目前添加
Run Android Monkey tester: monkey test通过发送伪随机的event数据流来进行压力测试
(在post-build action中可以选择publish android monkey tester result 来输出monkey test的结果)
Uninstall Android package : 卸载apk

0 0