Skip to content

Latest commit

 

History

History
63 lines (35 loc) · 3.81 KB

Jenkins-integration.MD

File metadata and controls

63 lines (35 loc) · 3.81 KB

Jenkins Integration

In this tutorial, we will demostrate how to setup and run aws-device-farm-integration or a similar project from Git in Jenkins pipeline. That will help to deploy and run your tests automatically.

Prerequisites

Your machine should

How to configure

  1. Follow step #1 of this intruction to install aws-device-farm in your Jenkins

aws-df-plugin

  1. Follow steps #2, #3 of this intruction to configure Jenkins system and validate your AWS credentials

aws-credentials

  1. Back to Jenkins Dashboard, create New item -> Free style project

  2. In Source Code Management, add your project URL and credentials

source-code-management

  1. In Build, click Add build step -> Execute shell

  2. In the command text field, add this script that helps to build aws-device-farm-integration Maven project

export MAVEN_HOME=[Your Maven installed folder]
export PATH=$PATH:$MAVEN_HOME/bin
mvn clean package -DskipTests=true

build-steps

  1. In Post Build Action, click Add post-build action -> Run Tests on AWS Device Farm

  2. Select your AWS DF Project and Device Pool that you created in AWS DF Console

  3. In Application field, enter the relative path of the AUT from your root project. Leave it blank if it is a web application

application

  1. In Choose test to run, select Appium Java JUnit. In Tests field, enter the path to maven build zip file. In this case, it should be target/zip-with-dependencies.zip

zip-file

  1. In Choose your execution environment, select Custom enviroment and Default TestSpec for Android Appium Java Junit v2.0 (adds support for Appium 1.14+) option to let AWS DF run with the latest Appium version they can support

custom-environment

  1. Review other AWS DF configurations then click Save

  2. Trigger the build and wait the pipeline completes

pipeline-console-log

When the pipeline completes, we are able to see the AWS Device Farm Results on Jenkins dashboard

dashboard