Jenkins Setup for Script Engine

This guide will help you in setting up a Jenkins pipeline to run useMango™ tests. Follow the steps outlined here to run useMango™ tests and view the results.

Creating your Pipeline

Jenkins is capable of handling a variety of build operations. Freestyle builds and Maven 2/3 builds are the two most widely used. For our configuration, we’ll utilize the Jenkins Pipeline.

Prerequisites:

To use Jenkins Pipeline, you will need:

  1. Jenkins 2.x or later (older versions back to 1.642.3 may work but are not recommended).

  2. Pipeline plugin, which is installed as a part of the Suggested Plugins.

Now, to set up the Jenkins pipeline,

  1. Create a Pipeline project in Jenkins.

  2. Next, we need to add parameters. Parameters allow you to prompt users for one or more inputs that will be passed into a build. In the Rebuild options choose This project is parameterized. We will need a total of four parameters (3 String and 1 Choice parameters).

    To add the parameters,

  • Click on Add Parameter and pick String Parameter from the dropdown menu, then enter Project as the Name. If the project you’re testing isn’t going to change, you can set a Default Value. The value will be the project you are testing in useMango™.

  • Create a new String Parameter, then enter Tags as the Name.

  • Similarly, add a new String parameter, and enter the Name as Key.

  • Finally, we need a Choice Parameter. From the dropdown choose Choice Parameter and add the following choices to it:

  1. Now scroll down to add the script provided by useMango™, click on Apply, and Save the changes.

  2. Once the changes are saved, we have to build the project. Go to Build with Parameters and add the parameter values. An example is shown below:

    We’re using the WebsiteTest project here, which includes a large number of useMango™ tests. We’ll execute useMango™ tests with the tags test and website that are currently marked as Ready. The provided APIKEY will be used as the value for the Key.

  3. Build the project and examine the results.

If you are not familiar with the process of viewing test results in Jenkins, you can learn more about it here.