Guy Salton is a technical expert on the whole performance testing ecosystem - load testing tools, monitoring tools, CI tools, Networking and Infrastructure. His expertise is helping with POCs and special technical projects for strategic customers. Guy talks at conferences and meetups around the world, writes blog posts and gives webinars.

Become a JMeter and Continuous Testing Pro

Start Learning
Slack

Test Your Website Performance NOW!

arrow Please enter a URL with http(s)
Feb 21 2017

How to Run the Taurus Docker Image with Jenkins

Welcome to part 2 of our series on how to execute load testing by using the Taurus Docker image. Last time, I explained what containers are and how to run a Taurus Docker image. This time, I will show how to integrate Docker into Continuous Integration tools, like Jenkins.

 

Why Integrate Docker into Continuous Integration Cycles?

 

Continuous Integration enables developers to test their code and check for issues and bugs during the development process, saving them time and resources. This is also true for running tests on containers - integrating Docker images saves time when building, enables running tests in parallel and automates testing. To add Docker to the cycle, developers can add the code they developed in GitHub and triggered in Jenkins, to Docker registries as images.

 

So let's begin.

 

Integrating the Taurus Docker Image into Jenkins

 

First, please follow steps 1-4 from the previous blog post to install Docker, pull the Taurus Docker image and create the folders for your scripts and artifacts in the Jenkins machine.

 

Once you’re done, you can create your new Jenkins project:

 

1. Open Jenkins and click on ‘New Item’

 

open jenkins, new item, docker

 

2. Choose ‘Freestyle project’ and name your project

 

jenkins, freestyle project, docker

 

3. Click on ‘Add build step’ and choose ‘Execute shell’

 

jenkins, add build step, execute shell, docker

 

4. Run the following command and specify the path to your scripts folder and to your artifacts folder

 

docker run --rm -v <path_to_scripts_folder>:/bzt-configs -v <path_to_artifacts_folder>:/tmp/artifacts blazemeter/taurus

 

For example:

 

docker run --rm -v /home/ubuntu/jenkins/taurus_container_scripts:/bzt-configs -v /home/ubuntu/jenkins/taurus_container_artifacts:/tmp/artifacts blazemeter/taurus

 

jenkins, artifact folder, docker

 

5. Save your project

 

6. Click on ‘Build Now’

 

build now, jenkins, docker

 

7. Click on the job that started running

 

click on the job that started running, jenkins, docker


8. Click on ‘Console Output’

 

console output, jenkins, docker

 

console output, jenkins, docker

 

You will see that the test has started and the KPIs are showing.

 

If you log into the machine, you will see that the test artifacts were saved to the artifacts directory that you created.

 

artifacts directory, jenkins, docker

 

Now you can run your load test using the Taurus Docker image as part of the continuous integration cycle, and monitor system health, detect errors and save time and resources while developing. To learn more about maximizing your load testing with CA BlazeMeter in your CI processes, check out this free webinar or sign up for a demo.

     
arrow Please enter a URL with http(s)

Interested in writing for our Blog?Send us a pitch!