JMeter is probably one of the best-known tools for performance testing, but sometimes we need other tools to provide us with different benefits. It is good to know that in some cases, you can use those advantages without rewriting the tests in another tool if you already have your JMeter script.

In this blog, we will explore the benefits of using Taurus and JMeter together or how to execute JMeter scripts with Taurus. Finally, we will discuss how BlazeMeter’s advantages can be used to improve our tests even more.

Table of Contents:

  • What is Taurus?
  • Advantages of Using Taurus & JMeter Together
  • How to Run Taurus-JMeter Test Scripts
  • BlazeMeter vs. Taurus for JMeter Testing

What is Taurus?

Taurus is an open-source test automation framework that allows you to write, execute, and monitor performance tests, as well as other testing types.

Advantages of Using Taurus & JMeter Together

To understand why Taurus can be used for JMeter testing, it is important to know some of its advantages compared to JMeter.

Real-time reports

Let’s start talking about real-time reports. The JMeter GUI allows you to monitor your execution in real-time by adding listeners, but it is not recommended to do it since, most of the time it results in high resource consumption in the load generator. On the other hand, executing JMeter in non-GUI mode does not provide much live information during the test. This makes Taurus a better option if you want to know the status of a test while it is running.

But what if we want a better report?

After executing a test, within the execution directory, a folder with the date and time of the test is created. In this folder, you can find the logs of the execution.

If we navigate to that folder on the command line and run the following command

bzt kpi.jtl -report

we can see an online BlazeMeter report with the test results, providing user-friendly graphs and tables that make it easy to understand for everyone.

Multi-platform compatibility

Taurus can be executed on any platform as it depends only on Python and Java.

Continuous performance testing potential

Finally, one of the greatest advantages of Taurus over JMeter is the easy integration of performance tests into pipelines for continuous performance testing. Since the scripts are written in YAML, they are easy to integrate and maintain.

How to Run Taurus-JMeter Test Scripts

Now that we better understand the advantages of using Taurus and JMeter together, let’s start running a JMeter test script with it. But first, we need to set up the testing environment.

Environment setup

First of all, check if you have Taurus installed on your computer with the following command:

bzt -v

If this is not the case, please follow these steps to get Taurus ready to use:

You must check if these tools are installed on your computer. Otherwise, you must install them (note that the following requirements are specific for Windows, but you can find the requirement for other OS on the Taurus website):

Update the pip, setuptools, and wheel:

python -m pip install –upgrade pip setuptools wheel

Finally, install Taurus:

python -m pip install bzt

We now have Taurus ready to use.

Run our JMeter script in Taurus

For this example, we will use the script created in this JMeter tutorial. The script should look like this:

This would be the same as creating and running a YAML file like the one below:

And then the next screen will appear:

This is the Taurus dashboard or the real-time report where we can see some indicators related to the execution of the test. As we mentioned before, if we wanted to see most of these indicators in the JMeter GUI we would have to add listeners that consume more resources.

If we want to have the same JMeter test, but written in a YAML format, Taurus has a command which allows us to convert a .jmx file to YAML format. This can be helpful to see what the same JMeter script looks like as a YAML file. The command to convert is the following:

jmx2yaml blazeDemo.jmx

Note: by default, the output file will be named blazeDemo.jmx.yml (we can delete the “.jmx” part).

BlazeMeter vs. Taurus for JMeter Testing

We now see how easily we can use Taurus to run our JMeter scripts. But what if you want to make your JMeter testing more seamless and scalable?

With BlazeMeter, there is no need for all the Taurus configurations, as these are already done. you just need to upload the file to BlazeMeter and run it. Also, if you want to adjust your JMeter script’s configuration (properties, concurrency, ramp-up, duration, etc.), you can easily overlap them through the BlazeMeter´s GUI without changing anything in the script.

Executing a JMeter script scaling to thousands of virtual users may require a big amount of load generators and resources, but this is not a problem with BlazeMeter.

Additionally, tests can be easily integrated into a pipeline for continuous integration using features and specialized plugins for CI tools such as Jenkins and Azure DevOps Pipeline, among others.

Reports of test execution can be easily shared with anyone and seen in real time. Also, clear tables and graphs make analytics accessible to everyone.

But how may I execute a JMeter script on BlazeMeter? We simply have to create a new JMeter test in BlazeMeter and upload the .jmx file.

After that, BlazeMeter will show the real-time report which you can share with your team.

 

Source: https://www.blazemeter.com/blog/taurus-jmeter