Difficulty: intermediate
Estimated Time: 20 minutes
  • Educational Objective
  • What You Need To Know Before You Start
  • Scenario Contents

IMPORTANT: You need to do the steps in sequence in order for the state of the lesson's learning environment to be consistent. Otherwise, you'll get behaviors that might be confusing.

Educational Objective

The objective of this scenario is to show you how to install a special version of Jenkins server that supports using the mabl CLI tool in a Jenkins Pipeline job. Also, the scenario shows you how to create tests in mabl and integrate those tests into the Jenkins Pipeline job.

What You Need To Know Before You Start

In order to get full benefit from the concepts and tasks presented in this scenario you need to have basic understanding of how to enter commands in the Katacoda interactive learning environment. Each step has commands that can be entered into the interactive terminal automatically by clicking on the command.

There is no need to type directly into the terminal window. Clicking on a command will automatically execute it.

Scenario Contents

Step 1 - Installing the mablJenkins server under Docker

Step 2 - Creating an account in mabl

Step 3 - Understanding mabl Tests, Plans, Environments and Deployments

Step 4 - Creating UI Tests using the mabl trainer

Step 5 - Creating the Jenkins Pipeline job for the mabl tests

Step 6 - Creating the Pipeline Script

Step 7 - Running the Jenkins Pipeline Job

You've crossed the finish line!

In this scenario you learned:

  • How to install the mablJenkins server
  • Create UI tests in mabl
  • Create a Jenkins Pipeline job under the mablJenkins server
  • Run the Jenkins Pipeline job
  • Evaluate the results of the Jenkins Pipeline job

Using the mabl CLI Tool To Run UI Tests Within a Jenkins Pipeline Job (Under Construction)

Step 1 of 7

Step 1 - Installing the mablJenkins server under Docker

Objective: The objective of this step is to install a special version of Jenkins that is configured with the mabl CLI tool. The Jenkins server is named, mablJenkins and runs as a container under Docker.

Step 1: Clone the mablJenkins repository code

git clone https://github.com/reselbob/mabljenkins.git

Step 2: Go to the project's directory

cd mabljenkins

Step 3: Build the container image locally.

docker build -t mabljenkins:v1 .

Step 4: Create the container based on the local Docker image, making the host's version of Docker available to the Jenkins container

docker run --name jenkins -d -p 80:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker mabljenkins:v1

Step 5: Confirm the docker container is running:

docker ps -a

You'll output that is similar to, but not exactly like the following:

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                       NAMES
177b9fe064b7        mabljenkins:v1      "/sbin/tini -- /usr/…"   24 seconds ago      Up 24 seconds>50000/tcp,>8080/tcp   jenkins

Step 6: Confirm that the mabl CLI tool is running within the mablJenkins container.

docker exec -it jenkins mabl --version

You'll get output similar to the following. But, your version might be different depending on when you run this mablJenkins setup.


Step 7: Bring up the mablJenkins server Web UI

Click on the tab labeled, mablJenkins in the horizontal menu bar of the Katacode interactive environment pane.


BE ADVISED:Sometimes it might take a minute or two for the Jenkins server to become operational under Katacoda. So, you might have to try the following step two, three or sometimes even four times.

You'll be presented the Katacoda page that that has the button labeled, Display Port as shown in the figure below.


Click the button.

Step : Login to the Jenkins web server.

After you click the Display Port button as described above in Step 6, you'll login to the Jenkins web server as shown in the figure below.


The access credentials are as follows:

User name: admin

Password: admin

Then, check the checkbox labeled, Keep me signed in and click the button labeled, Sign in.

The Jenkins main home page will appear, as shown in the figure below.


Congratulations! You have Jenkins Server up and running with the mabl CLI tool installed.