Jenkins with Espresso

You can use the Gradle plugin as part of a Jenkins CI controlled job. This section guides you through the process of integrating your automation scripts with Jenkins based on your use case, including the option to utilize a local Android project.

Important: This document includes references to third-party products, Jenkins and Android Studio. The user interface and usage of third-party products are subject to change without notice. For the latest published information about Jenkins, see https://www.jenkins.io/doc/. For the latest published information about Android Studio, see https://developer.android.com/studio/intro.

Scenario 1 | Android Studio

An Android Studio (AS) project folder is hosted in a Git Repository that is accessible to Jenkins (you can access it here). The AS project is already configured to work with the Gradle plugin, meaning the build.gradle and config.json files are defined properly, as described in the Espresso section.

Scenario 2 | Standalone mode with Gradle plugin

You run Gradle from Jenkins using the Jenkins Gradle plugin. Application debug and Espresso test .apk files exist in the local file system. An example configuration file is available here.

Scenario 3 | Standalone mode with Gradle wrapper

This scenario is the same as Scenario 2 without the Jenkins Gradle plugin. Instead, you run an installed version of the Gradle wrapper.