Jenkins

How to run Jmeter scripts by Taurus and Jenkins?

As part of CI/CD process we can integrate JMeter with Jenkins and execute the scripts as explained in the tutorial. Another way to integrate JMeter in Jenkins is by using Taurus, an open source test automation framework for easily running performance tests.

Taurus, an open source test automation tool that extends and abstracts JMeter, and helps to overcome various challenges. Taurus provides a simple way to create, run and analyze performance tests. It provides execution of JMX files, parametrizing via YAML, development of new tests in YAML, merging multiple JMX and YAML combinations, console, JUnit and BlazeMeter reporting.

The advantages of running Taurus+JMeter from Jenkins (compared to just JMeter from Jenkins):

To do this you have to:

1. Install Taurus.

2. If you don’t have JMeter, the Taurus build will install it for you. If you already have JMeter in your Jenkins host, add JMETER_HOME to your PC environment variables.

3. In Jenkins: create a Freestyle project.

4. To create a parametrized Jenkins build ,click the checkbox This project is parameterized and add parameters:

5. Go to the Build tab and add a build step: Run Performance Test.

Fill in the Taurus tool parameters:

$SCRIPT_PATH -o execution.0.concurrency=$USERS -o execution.0.iterations=$ITERATIONS -o execution.0.ramp-up=$RAMPUP -o modules.blazemeter.token=$API_KEY:$API_SECRET -o modules.blazemeter.project=$PROJECT_NAME -o modules.blazemeter.test=$TEST_NAME -report

6.  Save and Click Build with Parameters

7. Enter the required parameter values and click Build

If everything went well you will see Taurus running in the console output.

The command report added before, will generate an External Report, so not only will you have the Performance Report but you also will have a BlazeMeter Report clicking over “View External Report”.

Click on it and BlazeMeter will open up for you. BlazeMeter provides many insightful KPIs in colorful graphs. You can also drill down analyze to labels or geo-locations, both in real-time and for results collected and stored over months.

running jmeter with taurus in jenkins, blazemeter reports
taurus reporting in blazemeter

Clicking on Performance Report you will get Jenkins built report

Taurus manages the Jenkins workspace, creating a folder for each build. You can access the logs and KPIs of your execution in an easy way.

taurus continuous integration

References:

https://gettaurus.org/

https://wiki.jenkins.io/display/JENKINS/How+to+run+JMeter+with+Jenkins

Categories: Jenkins

Tagged as:

Leave a Reply