Slave for Android UI Test

43 views
Skip to first unread message

Kirshan Luhana

unread,
Oct 13, 2015, 6:58:42 PM10/13/15
to Jenkins Users
Hi

I heard there is some difference between running UI / Android projects from studio and Jenkins.

We are setting Jenkins slave first time for UI test, is there any special consideration for setting Android / Gradle environment , versions, environment variables and some special plugins / tools to install ?

We are using
android.tools.build:gradle:1.0.1
compileSdkVersion 22 buildToolsVersion '21.1.2' defaultConfig { minSdkVersion 16 targetSdkVersion 22


Christopher Orr

unread,
Oct 14, 2015, 9:57:00 AM10/14/15
to jenkins...@googlegroups.com
On 14/10/15 00:58, Kirshan Luhana wrote:
> I heard there is some difference between running UI / Android projects
> from studio and Jenkins.

I don't know where/what you heard, but there shouldn't be any
Jenkins-specific issues. You can already build Android apps from the
command line using Gradle, and doing it in Jenkins is no different.


> We are setting Jenkins slave first time for UI test, is there any
> special consideration for setting Android / Gradle environment ,
> versions, environment variables and some special plugins / tools to
> install ?

The easiest way to build an app with Jenkins (or anywhere) is to add the
SDK Manager Gradle plugin to your Android project:
https://github.com/JakeWharton/sdk-manager-plugin

Building on Jenkins then just requires checking out the source code, and
running the ./gradlew task(s) you want — either with an "Execute shell"
step, or by using the Gradle plugin.

If you additionally want Jenkins to run an emulator for UI tests, you
can use this plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Android+Emulator+Plugin

Regards,
Chris

Kirshan Luhana

unread,
Oct 14, 2015, 10:55:16 AM10/14/15
to Jenkins Users
Thank you very much for this guide, we are already using this procedure.

Actually we are facing some ui tests fail with different errors on different JDK , Android build tools settings. When we asked developers to run test on their system they argue that these test only be run via Jenkins. As I am new to Jenkins so wonder if there is some special configurations with jenkins.
Reply all
Reply to author
Forward
0 new messages