CloudTest Jenkins Plugin

Document created by DPM Admin Employee on Jul 20, 2017Last modified by Jijius Jabez on Aug 10, 2017
Version 2Show Document
  • View in full screen mode

The CloudTest Jenkins Plugin allows you to easily run the MakeAppTouchTestable utility on an iOS or Android project, silently install an iOS app on a connected device, play CloudTest compositions (and include the output in the build's test results.) Additionally, launch and tear down grids, results databases, and test environments.

 

Below, you will find details on:

  • Installling the SOASTA CloudTest Jenkins Plugin
  • Configuring the SOASTA CloudTest Jenkins Plugin
  • Deploying Environments using the SOASTA CloudTest Jenkins Plugin
  • Playing a Composition
  • Starting and Tearing Down a Test Environment
  • Starting and Tearing Down a Grid
  • Starting and Tearing Down a Results Database (RSDB)

 

TIP: It's important to start a Test Environment BEFORE starting a Grid or RSDB. Equally important is to tear down a Grid or RSDB BEFORE tearing down a Test Environment.

 

For more information on plugin updates and versions, please visit the CloudTest Jenkins Plugin wiki article.

 

Installing the SOASTA CloudTest Jenkins Plugin

 

Use the following steps to install the CloudTest Plugin from within your Jenkins instance.

 

  1. In Jenkins, click Manage Jenkins, and then click Manage Plugins.

 

  1. Click the Available tab.
  1. Locate the SOASTA CloudTest Plugin in the list (using Cmd+F and "SOASTA" is a quick way to locate it). Place a checkmark in the box next to the plugin.

 

  1. Click the Install without restart button at the bottom of the page.

 

The Installing Plugins/Upgrades page appears and indicates success once the install completes.

 

Configuring the SOASTA CloudTest Jenkins Plugin

 

Before using the plugin, you will need to provide the CloudTest server information, in the Manage Jenkins > Configure System page.

 

 

  1. Enter the CloudTest URL and the matching credentials. SOASTA recommends creating a dedicated CloudTest account for Jenkins to use.
  1. Save the Configure System page before exiting.

 

Deploying Environments using the SOASTA CloudTest Jenkins Plugin

 

  1. In your Jenkins instance, go to Manage Jenkins > Configure System.

 

  1. Set up your credentials for CloudTest Manager (CTM). You set it up just like another CloudTest instance. Substitute your own name and password.

 

  1. Once you have that tested and saved, return to your job config and add the Start Test Environment action.

 

Playing a Composition

 

  1. Add a build step and select Play Composition from the drop down.

 

Note: If you are adding more than one composition, click the down arrow to expand the entry field before entering the first composition path.

 

  1. . Enter each composition to play using its full SOASTA Repository path (shown below).

 

Note: Ensure that you have dragged all the steps into the right order before building. The order should be the same as in this tutorial, but may vary slightly depending on whether you're using devices, simulators, or both.

 

  1. Click Save to complete the Jenkins job.

 

Starting and Tearing Down a Test Environment

 

  1. Ensure you have created a Test Environment in your CloudTest instance.
  1. Go to Jenkins > New Item. Name your item.
  1. Select the Freestyle project radio button and then click OK.

  1. Go down to the Build section and select Start Test Environment in the Add build step drop-down menu.

 

  1. Select a Test Environment name (must match the test environment you created in your CloudTest instance).
  1. You can customize how long SCommand waits for your Test Environment to hit a ready status. If your Test Environment exceeds the limit you enter (or the default 600 seconds), then your build will fail and your Test Environment will tear itself down.

 

  1. Select Stop Test Environment in the Post-build Actions so if there is any issue with a build step or a failure those resources are tore down.

 

Starting and Tearing Down a Grid

 

Starting a Grid

 

  1. Ensure you have created a grid in your CloudTest instance. Visit the Creating a New Grid help article for instructions.
  1. Go to Jenkins > New Item. Name your item.
  1. Select the Freestyle project radio button and then click OK.

 

  1. Go down to the Build section and select Start Grid in the Add build step drop-down menu.

 

  1. Select a Grid Name (must match the grid you created in your CloudTest instance).
  1. You can customize how long SCommand waits for your Grid to hit a ready status. If your Grid exceeds the limit you enter (or the default 600 seconds), then your build will fail and your Grid will tear itself down.

 

  1. Select Stop Grid in the Post-build Actions so if there is any issue with a build step or a failure those resources are tore down.

 

Tearing Down a Grid

 

Follow all the steps above except for step 4, where you will select Stop Grid from the dropdown menu.

 

 

Starting and Tearing Down a Results Database (RSDB)

 

Starting a RSDB

 

  1. Ensure you have created a results database in your CloudTest instance. Visit the Results Databases help article for instructions.
  1. Go to Jenkins > New Item. Name your item.
  1. Select the Freestyle project radio button and then click OK.

 

  1. Go down to the Build section and select Start RSDB in the Add build step drop-down menu.

 

  1. Select a RSDB Name (must match the RSDB you created in your CloudTest instance).
  1. You can customize how long SCommand waits for your RSDB to hit a ready status. If your RSDB exceeds the limit you enter (or the default 600 seconds), then your build will fail and your RSDB will tear itself down.
  1. Select Stop RSDB in the Post-build Actions so if there is any issue with a build step or a failure those resources are tore down.

 

Tearing Down a RSDB

 

Follow all the steps above except for step 4, where you will select Stop RSDB from the dropdown menu.

 

Attachments

    Outcomes