13
Mobile Testing Enterprise Jenkins Integration Release 7.0

Mobile Testing Enterprise Jenkins Integration - SIGOS · Mobile Testing Enterprise Jenkins Integration 4 Keynote Confidential 1 Overview A Mobile Testing Enterprise extension for

  • Upload
    lamhanh

  • View
    243

  • Download
    2

Embed Size (px)

Citation preview

 

 

 

Mobile Testing Enterprise

Jenkins Integration Release 7.0

Mobile Testing Enterprise    Jenkins Integration 

ii  Keynote Confidential 

Mobile Testing Enterprise 7.0 

February 2015 

Copyright Notice

Copyright © 1995‐2015 Keynote LLC. All rights reserved.     

THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT ANY 

EXPRESS REPRESENTATIONS OF WARRANTIES. IN ADDITION, KEYNOTE DISCLAIMS ALL 

IMPLIED REPRESENTATIONS AND WARRANTIES, INCLUDING ANY WARRANTY OF 

MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON‐INFRINGEMENT OF 

THIRD PARTY INTELLECTURAL PROPERTY RIGHTS. 

All text and figures included in this publication are the exclusive property of Keynote and may not be 

copied, reproduced, or used in any way without the express permission in writing of Keynote. 

Information in this document is subject to change without notice and does not represent a commitment 

on the part of Keynote. Keynote may have patents or pending patent applications covering subject matter 

in this document. The furnishing of this document does not give you any license to these patents except 

as expressly provided in any written license agreement from Keynote.   

The trademarks or registered trademarks of Keynote LLC in the United States and other countries include 

Keynote®, DataPulse®, CustomerScope®, Keynote Customer Experience Rankings®, Perspective®, Keynote 

Red Alert®, Keynote WebEffective®, The Internet Performance Authority®, MyKeynote®, SIGOS®, SITE®, 

keynote® The Mobile & Internet Performance Authority™,  Keynote FlexUse®, Keynote DeviceAnywhere®, 

DeviceAnywhere®, Keynote DemoAnywhere®, Keynote MonitorAnywhere®. All related trademarks, 

trade names, logos, characters, design and trade dress are trademarks or registered trademarks of 

Keynote LLC in the United States and other countries and may not be used without written 

permission.  All other trademarks are the property of their respective owners.  

Please forward any comments or suggestions regarding this document to Keynote Support. 

Keynote LLC  

777 Mariners Island Blvd.  

San Mateo, CA 94404 

 

Jenkins Integration    Mobile Testing Enterprise 

  Keynote Confidential  iii 

Contents

1  Overview ................................................................................................................. 4 

2  Requirements ......................................................................................................... 4 

3  Installation .............................................................................................................. 4 

4  Executing a Test Case ............................................................................................ 6 

5  Application Upload ............................................................................................. 10 

6  Using the MTE Jenkins Extension with a Jenkins Slave ................................ 12 

 

 

 

Mobile Testing Enterprise    Jenkins Integration 

4  Keynote Confidential 

1 Overview

A Mobile Testing Enterprise extension for Jenkins enables you to execute test cases directly from Jenkins 

and to upload applications available in the Jenkins workspace onto Keynote devices. This note describes: 

Requirements 

Installing the plugin 

Executing a DeviceAnywhere Studio test case from the Jenkins interface 

Uploading an application to a Mobile Testing Enterprise device 

Using the MTE Jenkins Extension with a Jenkins Slave 

2 Requirements

The Mobile Testing Enterprise extension for Jenkins has been tested for Jenkins 1.597 on Windows, Linux, 

and Mac OS. JDK 1.8 (no GRE) should be installed on Windows Jenkins machines.  

Integration with a Jenkins slave is supported. 

Installing and running Jenkins with the Mobile Testing Enterprise Jenkins extension requires a minimum 

of 256 MB PermGen memory.  

Contact Keynote Support (http://support.keynote.com) for the Mobile Testing Enterprise Jenkins 

extension file da-jenkins.hpi (56 MB). 

On the Mobile Testing Enterprise cloud‐based service, this product can only be used to run tests on 

private devices. 

3 Installation

To install the Mobile Testing Enterprise extension for Jenkins: 

1 From your Jenkins dashboard, select Manage Jenkins in the left column. 

 

Jenkins Integration    Mobile Testing Enterprise 

  Keynote Confidential  5 

2 Select Manage Plugins. 

 

3 In the Advanced tab, Browse to select the da-jenkins.hpi file from your file system, then click 

Upload.  

 

4 Restart Jenkins.  

Next, you will need to configure the Mobile Testing Enterprise Jenkins extension to point to your mobile 

test environment: 

1 Navigate to Manage Jenkins > Configure System. 

2 In the DeviceAnywhere section: 

 

a Provide the IP address/hostname and port of your Mobile Testing Enterprise environment’s 

Access Server: Access Server Address, Access Server Port. Check Secure connection if the 

Access Server uses SSL. 

b Enter credentials (Email, Password) that Jenkins can use to log in to Studio and perform tasks 

such as download project information, kick off test cases, or access devices. 

c If using Studio behind a proxy server, click Advanced and enter proxy information. Enter the 

required information, such as proxy server Username and Password if used on your system. 

Mobile Testing Enterprise    Jenkins Integration 

6  Keynote Confidential 

 

d Click Update DA project(s) list to download the list of projects (and their test cases) that the 

Studio account has access to. Notifications display whether the information has been 

downloaded. 

 

NOTE Projects must be published in Studio for them to be visible to Jenkins. 

3 Save your configuration changes. 

4 Executing a Test Case

You can execute a single‐device Mobile Testing Enterprise test case directly from Jenkins. This involves:  

Publishing the container project in Studio, 

Setting up a project in Jenkins,  

And adding the appropriate build step. 

NOTE When scheduling a Jenkins job on a device, we do not recommend using a shared Mobile Testing 

Enterprise device, as it might not be available at the time of your schedule. 

1 In Studio, ensure that you have published the project containing the test case you wish to execute via 

Jenkins: Right‐click your project in the project list > Publish Project. You have the option to build the 

project and check in all files before clicking Publish.  

Jenkins Integration    Mobile Testing Enterprise 

  Keynote Confidential  7 

 

2 From the left pane of the Jenkins dashboard, select New Item. 

  

3 Select a project type, e.g., Freestyle project. Enter a name for the project (Item name) and click OK. 

 

NOTE All project types are supported. 

4 On your project page, click the Add Build Step drop‐down list. Or select Configure in an existing 

project. 

Mobile Testing Enterprise    Jenkins Integration 

8  Keynote Confidential 

 

5 Select the DeviceAnywhere Automation build step. (You can also upload the application onto the 

device first from your Jenkins build workspace and then execute a test case—see Application Upload 

below.) 

 

6 Select Project containing the test case to be executed, the Test case, and the Device to execute the test 

case on. Select only a single‐device test case as multi‐device test case execution is not supported. 

 

Jenkins Integration    Mobile Testing Enterprise 

  Keynote Confidential  9 

7 You can Add or Delete test case executions, including running the same test case on another device. 

If you add multiple test case executions, they are kicked off sequentially.  

8 Save your project configuration and kick off your build. 

You can view test case execution in Studio: 

1 Log in with the same credentials used for configuring the Mobile Testing Enterprise Jenkins 

extension.  

2 Wait to see a lock icon next to the device selected in Jenkins for test case execution. 

 

3 Wait for the device. You can then view test case execution when it kicks off.  

 

CAUTION Do not to interact with the device or test case execution kicked off by Jenkins can fail. 

After test case execution, you can access results from Jenkins build history. From the Jenkins dashboard, 

select your project and then the build containing test case execution. A link to run results is displayed. 

Figure 4‐1 Jenkins Test Case Execution Results 

 

Mobile Testing Enterprise    Jenkins Integration 

10  Keynote Confidential 

If a Mobile Testing Enterprise test case execution or application upload fails, the item is marked as failed 

in results but the build is marked as unstable.  

NOTES Multi‐device test case execution is not supported via Jenkins. 

Mobile Testing Enterprise test cycles cannot be executed via Jenkins. 

Parallel execution of multiple Mobile Testing Enterprise test cases is not supported; you can kick off a 

build with several test case executions and application upload items, but they are executed sequentially. 

5 Application Upload

The Mobile Testing Enterprise Jenkins extension makes it possible to take an Android or iOS application 

from a Jenkins workspace and load it directly after a build onto a mobile device without having to launch 

Studio. 

NOTE When scheduling a Jenkins job on a device, we do not recommend using a shared Mobile Testing 

Enterprise device, as it might not be available at the time of your schedule. 

To upload an application onto a device: 

1 Select your project on the Jenkins dashboard and click Configure in the left pane. 

 

2 Add a build step—select DeviceAnywhere Upload Application. (Optionally, you can follow this 

build step with test case execution from Jenkins—see Executing a Test Case above.) 

 

You will see fields to provide details of the application to be uploaded.  

Jenkins Integration    Mobile Testing Enterprise 

  Keynote Confidential  11 

 

3 Provide application and device details: 

a Enter the Name, Type (Android APK or IOS), and Version of the application to be uploaded. 

b Enter the path to the application file(s); click the   icon for help with this.  

The path must be relative to the build workspace, so from the example below, the file 

HelloAndroid.apk is picked up from a workspace directory such as C:\Program Files (x86)\Jenkins\jobs\DA-Jenkin Testing\workspace.  

Enter multiple files in a comma‐separated list 

c Select a Device from the drop‐down list to upload the application onto. 

Click Advanced for options to sign and enable applications for object‐based scripting and testing. 

You can sign (iOS only) applications with Keynote’s certificate for loading onto non‐jailbroken 

devices. Click enable to inject the libraries required for native object‐based scripting (iOS only). 

 

4 Save your configuration changes and kick off your build. 

The application upload is triggered according to your build schedule and other items included in your 

build. 

You can access results from Jenkins build history—from the Jenkins dashboard, select your project and 

then the build containing application upload.  

Mobile Testing Enterprise    Jenkins Integration 

12  Keynote Confidential 

Figure 5‐1 Jenkins Application Upload Results 

 

6 Using the MTE Jenkins Extension with a Jenkins Slave

You can use the MTE Jenkins Extension for kicking off running a test case or uploading an application 

onto a device from a Jenkins slave machine. Keynote supports this functionality on Windows or Linux 

slave machine. 

Before kicking off execution from a slave, you must perform some configuration steps: 

1 On the Jenkins master, create a new project (New Item) or Configure an existing project. 

2 Check Restrict where this project can be run. 

3 Begin typing the name of your Jenkins slave machine. You can choose an option from the auto‐

complete options shown. This ensures that when you build the project, it is run on the slave. 

 

4 In the Build Environment section, you must specify files to be downloaded from the master machine. 

NOTE This step requires that you have installed the Copy to Slave Plugin on the Jenkins master. 

a Select Copy files into the job’s workspace before building. 

b Enter the path DeviceAnywhere/jars/*.jar. 

c Ensure that Paths are relative to $JENKINS_HOME/userContent is selected (default).  

Jenkins Integration    Mobile Testing Enterprise 

  Keynote Confidential  13 

 

5 Save and build your project.