Android模拟器插件,找不到启动器图标

时间:2013-09-26 08:32:26

标签: android jenkins

我正在使用带有jenkins的Android模拟器插件。除了android应用程序,我还有一个uiautomator的java项目,它是main pom中构建模块的一部分。

The maven goal is : mvn install

uiautomator测试在尝试断言“Apps”屏幕中存在应用程序启动图标时失败。 我是否必须安装应用程序apk或插件是否自动执行,如插件文档中所述(我的插件版本是2.10,jennkins版本是1.531)

我如何知道应用程序已安装在模拟器中。 模拟器启动没有任何问题。

以下是jenkins日志的一部分:

[android] Starting Android emulator $ /var/lib/jenkins/tools/android-sdk/tools/emulator -no-boot-anim -ports 35965,56985 -prop persist.sys.language=en -prop persist.sys.country=US
-avd hudson_en-US_120_800x1280_android-18_armeabi-v7a -no-snapshot-load -no-snapshot-save -no-window

* daemon not running. starting it now on port 42120 *
* daemon started successfully *

Failed to Initialize backend EGL display

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:56985 [android] Waiting for emulator to finish booting... $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 shell getprop dev.bootcomplete error: device offline $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:56985

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 shell getprop dev.bootcomplete error: device offline $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:56985

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 shell getprop dev.bootcomplete error: device offline $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:56985 $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:56985

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 shell getprop dev.bootcomplete $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:56985

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 shell getprop dev.bootcomplete $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:56985

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 shell getprop dev.bootcomplete $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect localhost:56985 $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:56985

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 shell getprop dev.bootcomplete $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:56985

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 shell getprop dev.bootcomplete $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:56985

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 shell getprop dev.bootcomplete $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 logcat -v time

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:56985 [android] Attempting to unlock emulator screen $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 shell input keyevent 82

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s localhost:56985 shell input keyevent 4

$ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect localhost:56985 [android] Emulator is ready for use (took 97 seconds)

1 个答案:

答案 0 :(得分:0)

  

我是否必须安装应用程序apk或插件是否自动执行,如插件文档中所述

documentation 表示您的APK将自动安装。

但是,如果您提供APK文件的路径,那么插件 会提供一个构建步骤来为您执行此操作:

  

在作业配置的“构建”部分下,选择“添加构建步骤”,然后选择“安装Android程序包”。

     

在显示的“APK文件”字段中,输入您要安装的APK的文件名。当构建运行时,APK将在模拟器启动后自动安装。