15 February 2016
This is a relatively short tutorial to JMeter tool
The aim is to give an overview of the tool - it will not cover everything
We will focus here on using the GUI, it is still possible to use CLI only
It is possible to record scenarios: simply browse your website with your web browser configured with JMeter, and replay your recorded scenarios with hundreds of VUSers.
Official website: jmeter.apache.org/download_jmeter.cgi
Download the latest binary in zip / tgz format
user : ~ > mkdir ~/Sandbox
user : ~ > cp Downloads/apache-jmeter-*.tgz ~/Sandbox/
user : ~ > cd Sandbox/
user : ~/Sandbox > tar -xvf apache-jmeter-*.tgz
user : ~/Sandbox > cd apache-jmeter-*/
user : ~/Sandbox > chmod 755 ./bin/jmeter
user : ~/Sandbox > ./bin/jmeter #if you are using JMeter without proxy
user : ~/Sandbox > ./bin/jmeter -H proxy-addr -P proxy-port #with proxy
Note: if your proxy is localhost, just use -H localhost
(http://127.0.0.1 & http://localhost won't actually work...)
"jmeter.bat"
If you are using a proxy:
jmeter.bat -H proxy-addr -P proxy-port
Troubleshooting: see jmeter.apache.org/usermanual/get-started.html
Need more configuration ? See: configuration details
Basically, we will hit an url with a certain number of VUsers to test the application
We will use this app to run our first JMeter test
curl http://localhost:8888/primesui/check
http://127.0.0.1:8888/primesui/
with your favorite browser, you should see the following webpage (see below)You will now setup a proxy with JMeter and this proxy will record any action you have on PrimesUI:
You will be able afterward to replay all the recorded actions with VUsers
First, create a "Thread Group" by clicking right on "Test Plan"
Click on the Start button on the Script Recorder to start the recorder
%JMETER_HOME%/bin/
Good news everyone, your browser is now ready! Simply hit "http://127.0.0.1:8888/primesui/", browse the page, hit several times "http://127.0.0.1:8888/primesui/check", have some fun with urls...
See screenshot below
In this configuration, each VUsers will basically hit /primesui/check a hundred times!
Take a look at:
Better interfaces & reports sexier, but theses tools are based on JMeter - no big news
The report generated is very precise and dynamic
Gatling is asynchronous => it is able to simulate a lot of VUs!
I hope you'll find this tutorial useful!