Favourite Quote

Every artist was first an amateur. - Ralph Waldo Emerson The more difficulties one has to encounter, within and without, the more significant and the higher in inspiration his life will be. - Horace Bushnell

Sunday, January 29, 2012

JMeter proxy

Most of those who fancy with commercial tools & those feel its cool to have a record & playback functionality so that they don't have to bother to the nitty gritty details of organising which parameters to send with a request,how an object is identified and so forth.

Here are steps to record :

Pre requisite :
1.Download jmeter from the jmeter.org website am on jakarta-jmeter-2.5

Download :http://jmeter.apache.org/download_jmeter.cgi

User manual : http://jmeter.apache.org/usermanual/index.html

2.Ensure that you are on a jdk version higher than 1.5.

3.Ensure that you set the classpath to bin for both jdk & jmeter.

4.Verify that you have set the classpath correctly.

All right now let's get started recording.

1.Right click on workbench navigate all the way upto HTTP Proxy server as shown in the fig -1

2.Now that we have added proxy server to work bench before we start recording let's make a few tweaks to the proxy server controller follow fig -2.

2.a : Add a name to Proxy - It is not mandatory to add a name, Also it is to be remembered that proxy settings will not get saved once you close your test.

2.b : Configure to a port number of your choice or leave to the default 8080.

2.c : Check boxes for Add Assertions,Regex Matching.

2.d : Check boxes for follow Redirects (This helps us capture the redirection).

2.e : URL patterns to include add the resources that you want to include by clicking the add button.

2.f : URL patterns to exclude add the resources that you want to exclude by clicking the add button most often it is the css,js,png,gif(we don't want to get most these load tested).

3.Now that we have configured to a Proxy server,let's move on to Test Plan give a name to Test Plan as shown in fig - 3.

4.Add a Thread group give a name to thread group

5.Now that we have a our test plan ,thread group,proxy settings in place.
Let's move on to setting up the browser.

5.a. Go to Tools > Internet options > Change the proxy settings.

6.You can have a look at how the recorded script looks like

6.a Give a name to the http request.

6.b Server name will be grabbed here.

6.c Path will be recorded.

6.d By Default Follow Redirects will be checked,uncheck that & check the Redirect Automatically so that can help you in understanding how your request was redirected.

6.e Send Parameters will let you know what are the parameters that were passed on. automationwithselenium.blogspot.com-Google pagerank and Worth