Sie sind auf Seite 1von 6

JMeter proxy Step-by-step

This short tutorial attempts to explain the exact steps for JMeter's proxy. For those new to
Jmeter, one easy way to create a test plan is to use the Proxy. What the proxy does is it
records the requests sent to the server. Jmeter's proxy currently does not support recordin
!TTP". "ince !TTP" is secure, the proxy is una#le to decrypt the traffic and record the
request parameters or coo$ies. There are several ways to et around this limitation. The
easiest method is to use %ad#oy http&''www.#ad#oy.com.au'. The second option is to
record in !TTP and then chane the test plan to use !TTP request defaults.
Basic Proxy Instructions
(. start )meter with )meter.#at on windows and )meter.sh on unix
*. select +test plan, on the tree
-. riht clic$ on the +test plan, and add a new thread roup& add ./ thread roup
0. select the thread roup
1. riht clic$ +add ./ confi element ./ !ttp 2equest 3efaults,
4. Protocol 5 enter +!TTP,
6. "erver name 5 enter +)a$arta.apache.or,
7. Path 5 leave #lan$
8. Port num#er 5 enter +79,
(9.select wor$#ench
((.riht clic$ on wor$#ench and add the !ttp proxy& add ./ non.test elements ./ !ttp
Proxy "erver
(*.Port field . :nter +8989,
(-.Taret ;ontroller 5 clic$ on the drop down and select +test plan / thread roup,
(0.;lic$ the +add, #utton in +Patterns to include,. This will create a #lan$ entry.
(1.:nter +.<=.html,
(4.;lic$ the +add, #utton in +Patterns to exclude,. This will create a #lan$ entry.
17.:nter +.<=.if,
(7.;lic$ the +start, #utton at the #ottom
(8."tart >nternet :xplorer, #ut do not close Jmeter.
Note: ma$e sure the include and exclude patterns are correct. %elow are some common
patterns for imaes and types of paes.
.< . all
.<=.pn 5 pn imaes
.<=.if 5 if imaes
.<=.)p 5 )pe imaes
.<=.php
.<=.)sp
.<=.html
.<=.htm
.<=.)s
?s a eneral tip, it is a ood idea to set the homepae for your #rowser to a #lan$ pae. This
way, it reduces the num#er of unwanted paes Jmeter records durin the session. >t is a ood
idea to try the proxy with different sites and et comforta#le with different filterin patterns.
*9.From the tool #ar, clic$ +tools ./ internet options,. This should #rin up the options.
*(."elect the +connection, ta#
**.;lic$ +lan settins, #utton near the #ottom.
*-.@n the connections ta#, chec$ +Ase a proxy server for your B?C,. The address and port
fields should #e ena#led now.
*0.?ddress 5 enter +Bocalhost, or the >P address of your system
*1.Port 5 enter +8989,.
*4.;lic$ +o$, #utton
*6.;lic$ +o$, #utton aain. This should return you to the #rowser
28.>n the +?ddress, #ar at the top, enter +http&'')a$arta.apache.or')meter'index.html, and
hit the +enter, $ey.
*8.;lic$ on a few lin$s on Jmeter's pae.
-9.;lose internet explorer and #rin up the Jmeter window.
Reviewing the Test Plan
:xpand the thread roup and there should #e several samplers. ?t this point, the test plan
can #e saved as is. >f you foret to add default http request settins, you will have to
manually delete the servername, and port. >n this sample, there aren't any default request
parameters. >f a particular request parameter is required #y all paes, the request defaults is
where one would add the entries.
(. "elect +thread roup,
*. 2iht clic$ +add ./ listener ./ areate report, to add an areate listener. The
areate listener will show some #asic statistics.
-. "elect +thread roup,
0. Cum#er of threads 5 enter +1,
1. 2amp up Period 5 do not chane
4. Boop count 5 enter (99
Running the Test
?t this point, we are ready to run our test plan and see what happens. "ave the test plan.
When you're ready to run the test, there's two ways&
(. 2un ./ "tart
*. ;2TB 5 2
%efore you start the test, select +areate report,. ?s the test runs, the statistics will chane
until the test is done. ?t the end of the test, the areate report should loo$ li$e this.
While the test is runnin, in the upper riht.hand corner, there should #e a reen square.
When the test is done, the #ox should #e rey.

Das könnte Ihnen auch gefallen