Here, I’m going to show you how to set up JMeter and Taurus. You’ll learn how to create a sample test on JMeter and then run it using Taurus.
Set up JMeter
Download:
ps://JMeter.apache.org/download_JMeter.cgi
(You’ll need Java to run JMeter, so make sure you have it installed first).
How to run JMeter
Unzip the folder, and find JMeter in the bin directory
Create example
For this example, we’ll first create 10 virtual users, then go to performetriks.com, and save as test1.jmx.
Open JMeter from the bin directory:
Right click on the Test Plan, then select Add -> Threads -> Thread Group:
Change the Number of Threads to 10:
Right click on the Thread Group, select Add -> Sampler -> HTTP Request:
Modify the Server Name or IP to the website that’s going to be tested:
Add a Result Tree to see the result:
Add a test Summary Report:
Save it as test1.jmx.
Run the example, and read the result.
There are two ways to run this example:
To run with GUI: click the green arrow at the top of the window:
You’ll find the content validation under the View Results Tree tab, and the average response time under the test Summary Report:
then type: jmeter -t test1.jmx -n -l report.jtl
which will generate a report.jtl
You can use JMeter to make the report easier to read by typing:
JMeter -g report.jtl -o report
You’ll find the result on the index.html in the report folder:
Run example with Taurus
Download Taurus: Go to https://gettaurus.org/install/Installation/ Click on:
There are two ways to run the example:
Open the terminal and change the directory to test1.jmx
then type: btz test1.jmx
then type: btz test1.yml
Both ways will generate a report in the same format, and print on the terminal:
You can use Taurus to generate xml and csv report files by adding a couple of lines in test1.yml
You’ll find the reports from the Taurus.xml and Taurus.csv files stored in the current directory:
Pros and cons
+ works on multiple systems such as Windows, Mac and Linux
+ runs on the user-friendly interface or command line
+ a free open-source tool
– involves a deep learning curve
– does not execute JavaScript
– does not measure the user experience
Use cases
We can use JMeter for many kinds of performance tests including the baseline test, smoke test and stress test.
Comments