Using JMeter with Jenkins
-
Run the file:
<YOUR-JMETER-PATH>>/bin/jmeter.sh
to open the JMeter GUI. For example, /usr/jmeter/bin/jmeter.sh would be used in this example.
In a definitive installation, you can set these commands to your path system or system variables.For Windows users the file will be
jmeter.bat
. -
From the JMeter GUI, go to File, and then select New.
-
Enter a name for your test plan.
-
On the left side of the screen, using the right or secondary select with your mouse, select your test plan.
Follow this path: Add > Thread(Users) > Thread Group, and select it. -
In Thread Group, increase the Number of Threads (users) to five and the Loop Count to two.
-
On the left side of the screen, right or secondary select Thread Group with your mouse, then follow this path: Add > Sampler > HTTP Request, and select the HTTP Request option.
-
In HTTP Request, enter the Name of your test, the Server Name or IP, and the Path context. For example, here we would use
Installing
,www.jenkins.io
, and/doc/book/installing/
. -
Repeat steps six and seven two more times to different context/pages. For example, we will use www.jenkins.io/node.
Now our plan has three things to test. -
To add a visual report, right or secondary select your Thread Group, then follow the path: Add > Listener > View results in table.
Select the View Results in Table option. -
To save the test plan, select the Save (disk) icon in the upper left side of the screen or go to File > Save, and enter a name for the test plan with a .jmx extension.
For example:jenkins.io.jml
.