Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Nov 26, 2019 11:58

How to setup a Jenkins job that runs a local Espresso & Gradle project 

Step-by-step guide

  1. Setup your Espresso project as described in this article - Espresso

  2. Log into Jenkins and create a new Freestyle project

  3. Select "Source Code Management" as "None"

  4. Under "Build" section, click on "Add build step" and select "Invoke Gradle script"

  5. Select "Use Gradle Wrapper" and check the box "Make gradlew executable"

  6. Add the absolute path to the project main directory in the field "Wrapper location" and in the "Tasks" field add the invocation of the Perfecto plugin with the absolute path to the JSON configuration file as input parameter, i.e. "perfecto-android-inst -PconfigFileLocation=/Users/user/Desktop/Cucumber/espresso-bdd-master/configFile.json"

  7. Make sure that the JSON configuration file contains the absolute path to the apk files. For example:

      "apkPath": "/Users/user/Desktop/Cucumber/espresso-bdd-master/app/build/outputs/apk/debug/app-debug.apk",
      "testApkPath": "/Users/user/Desktop/Cucumber/espresso-bdd-master/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk"