HTTP Proxy Server is a non-test element feature of JMeter which enables user to record scripts from a real browser.
1. Add Thread Group in your Testplan
Add Thread Group
2.
Add Proxy Server to WorkBench
Add Non-test Elements > HTTP Proxy Server
Set “Target Controller” where your recorded scripts will be added
Set URL patters to INCLUDE or EXCLUDE
3.
Set your Browser to use Proxy (I used IE7 browser)
Go to Tools > Internet options > Connections > LAN Setting
Select “proxy server”
Set Address = localhost; Port = 8080
4. Browse your application and record
5. In HTTP Proxy Server, click “Stop” when finished
To verify if recording was successful, you should be able to see HTTP requests generated under your “Target Controller”
More Tricks:
Add a Constant Timer to the HTTP Proxy Server node to record your think-time (right-click on the “HTTP Proxy Server” node and choose “Add,” “Timer,” and then “Constant Timer.”)
Next change the “Thread Delay” on the timer to “${T}” to tell the proxy server to record your time rather than to add a constant time for each request.
i am new to http proxy, and so am encountering an error or two.
my application under test is a app running on tomcat port 8080, i set up a http proxy server and recording controller, however when i click start i get port already in use.
here are my current settings:
IE: localhost, port:8080
JMeter Thread: 127.0.0.1/audiomatch Port:8080
HTTP Proxy Server Port: 8080
I’m guessing that the proxy cant run on the same port as the app, but if I alter the IE settings then obviously I cant view by app to record tests.
Any ideas?
hi brad,
you are right that the proxy cant run on the same port as the app… try altering the IE settings AND HTTP proxy server to port other than 8080, just make sure IE and HTTP proxy have the same port so you can view your app and record your scripts.
lemme know if it works!
hi girlie
thanks alot i managed to get it working. unbeknown to me, i had previously configued the proxy exceptions to divert the URL i was working with, so after clearing that off, all is going well.
your information was very useful so thanks.
can you recommend any good sources for newbies to jmeter.
ive basically got to test load, performance for 2-3k users hitting and manipulating the website.
thanks though, this page was really very useful.
hi brad,
try looking at this
http://jakarta.apache.org/jmeter/index.html
this site helps a lot.
or you may check this out ->
http://www.scribd.com/doc/7499267/Load-Testing-With-JMeter
regarding your 2-3k users Jmeter’s distributed testing is the tool.
happy testing!
Please anyone help me on this issue regarding HTTP proxy server.
My question is JMeter is not able to record.
Steps to be followed:
1- adding one threadgroup under this add one Http default request
2- In Http Request default my web server si 217.17.227.243 and port is 7003
3- Then i add one HTTP proxy server and port is 8080 i.e same as my IE brower whose ip is 172.19.56.18 and port is 8080.
Please help me on this when i start its not recording
Hi Subrat!
Your setting seems right for me. I have some questions/suggestions for you to find out what is the problem:
1. Are you using a dial up or VPN connection?
Using a proxy server for LAN does not apply to dial up or VPN.
2. Is 8080 an open port? Could you try using a different port say 8085 or any other open port, and let’s see if it will work.
3. If in step 2, proxy server still does not record the scripts properly. I suggest you first try to record scripts in google, if you made it here at least we would know that Jmeter proxy server is working fine. And the next thing to find out is why its not working in your app.
These are my best shots for now.
I am using the jmeter to do performance testing of my application. but my application is running on a remort server and I am connecting to that server via VPN. In this case I am not setting any parameter in the browser. How can I be able to record my application in this case?
Thanks & Regards
Sirish
Hi Sirish,
I’m not sure if jmeter proxy works now on VPN connection, but you can check this link,
http://wiki.apache.org/jakarta-jmeter/JMeterFAQ#How_do_I_ensure_the_remote_jmeter_server_can_communicate_with_the_master_client.3F
hope this one helps.
I am connected to vpn.Now I want to record some remote urls
I have enabled proxy in the browser with port as 9090.I have added same port no to HttpProxyServer in Jmeter.But whenever I had enabled proxy ,I am unable to access remote urls.With out enabling the proxy we cannot run the Jmeter .
So What should I do now to record the urls
Please do needful
Hi Sathish!
Sorry for the delay! I really haven’t tried using JMeter for a Webservice, but i found this blog which i hope would somehow help you
http://theholyjava.wordpress.com/2010/06/04/webservice-testing-with-jmeter-passing-data-from-a-response-to-another-request/
Girlie
Using JMeter- 2.4, I am able to record the Local urls (Accessing these local urls not dependent on VPN connection).
Whereas, unable to record the remote urls that can be accessed only using VPN connection.(Connection of VPN is must for accessing remote urls).
So is there any way to JMeter Record the urls which can be accessed only if VPN is connected
Thanks in Advance.
Aparajita
i am getting a pop up to enter key store password.
While going to execute my recorded test.
Please suggest me how to overcome from the issue.
Thanks
Biraja
Aparajita S
:
Hi,
Using JMeter- 2.4, I am able to record the Local urls (Accessing these local urls not dependent on VPN connection).Whereas, unable to record the remote urls that can be accessed only using VPN connection.(Connection of VPN is must for accessing remote urls).So is there any way to JMeter Record the urls which can be accessed only if VPN is connectedThanks in Advance.
Aparajita
While recording the application using vpn connection, uncheck the ‘automatically detect settings’ check box in the LAN settings .
Regards,
Sushma
Using Jmeter 2.4 and previously able to record the flex application.Now unable to record the application as the images in application are not getting loaded and in the Jmeter.log file it displaying the error as below.
ERROR – jmeter.protocol.http.proxy.Proxy: java.net.SocketException: Connection closed by remote host
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkWrite(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at org.apache.jmeter.protocol.http.proxy.Proxy.writeToClient(Proxy.java:443)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:264)
ERROR – jmeter.protocol.http.proxy.Proxy: Problem with SSL certificate? Ensure browser is set to accept the JMeter proxy cert: Connection closed by remote host
Due to the above error, could continue with the record.
Please let me know if you have any comments.
Regards,
Sushma
Were you able to resolve this issue ?
2011/01/13 12:20:51 ERROR – jmeter.protocol.http.proxy.Proxy: Problem with SSL certificate? Ensure browser is set to accept the JMeter proxy cert: Software caused connection abort: socket write error
2011/01/13 12:20:53 INFO – jmeter.protocol.http.sampler.HTTPSampler: Error Response Code: 404, Server sent no Errorpage
I am running my liferay portal server on 8080. I setup jmeter http proxy to use 9090 and also the same port 9090 for 127.0.0.1 in my firefox proxy settings.
I started the server and then clicked “Start” in jmeter http proxy. Opening the firefox, when I try to
http://127.0.0.1:9090
, I got an unknown host exception.
What could be the problem? Am I missing any thing??
1.Whem i am recording of uploading of an image in jmeter it was throwing error SSL certificate error
2.When i am uploading a video am getting 404 error.
Could you please tell the solution in a detailed way because am facing lot of problems.
Hi Friends,
I have a problem in recording JMeter in following situation.
We are using our company proxy say Host : abcd and port :80. i have launched an application in my own IIS. So when i try to run jmeter with following config jmeter.bat -H abcs -P 80 -u xxxxx -p xxxxxx .
I have created JMeter HTTPProxy with some port number say 81. It doesnt listen. Its so obvious that it wont listen just because my application is launched in port 80 and i’m running jmeter proxy at port 81. I cant run Jmeter proxy in 80 as because IIS is using 80.
So what i did i launched application in some other system in same network and tried running through port 81 but my company proxy is not allowing to rrun any application through any port other than port 80. It is something like. Nothing is synchronized. Can you please some one let me know how can i change jmeter proxy setting from localhost to my company proxy abcd. Because all the time jmeter expects host to be 127.0.0.1. But i want it to be abcd. Can any one guide me how to proceed further.
i am trying to using port 9000 in http proxy server and i start proxy server then i found alert (please change port number) in my application, so i am changing 8080 instead of 9000 so it starts, and i change my browser settings and i follow instructions, but in my recording Controller i can’t see any changes what so ever can you please solve this problem because i new to jmeter
Hi!!! I don’t now if what nitesh es saying is similar to my problem.
I’m recorded a test, in which one of the forms has 3 combo boxes… which content is filled dynamically depending on inmediate previos selection.
However, when i run the test it seems like the values of the combo boxes are unknown… any tip on how to do this?
Thanks in advance
Are you using both 8080 in your http proxy server and browser settings? If yes, there shouldn’t be any problem.
From your HTTP proxy server, we have a target controller settings, once you do actions in your browser, you should be able to see recorded actions where target controller is set.
HI Friends..
i am Mahesh..i am new to JMeter and i am trying to record requests for applications which are in my tomcat (localhost) folder .but i am not able to record and one more thing is i am able to record the applications which are in other system through IP address successfully.
so can any one suggest me regarding this issue y i am not able to record the requests…thanks in advance.
and one more thing is i am getting these errors while recording other’s applications frequently which i listed below..
1)Thread Name: Thread Group 1-1 Sample Start: 2012-02-03 15:50:21 IST
Load time: 1182 Latency: 1182 Size in bytes: 151 Headers size in bytes: 151
Body size in bytes: 0 Sample Count: 1 Error Count: 1 Response code: 404
Response message: Not Found Response headers:HTTP/1.1 404 Not Found
Server: Microsoft-IIS/7.5 X-Powered-By: ASP.NETDate: Fri, 03 Feb 2012 10:22:05 GMT
Connection: close Content-Length: 0HTTPSampleResult fields: ContentType:
DataEncoding: null
Thread Name: Thread Group 1-1
Sample Start: 2012-02-03 16:41:37 IST
Load time: 349
Latency: 332
Size in bytes: 319228
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code:
Response message: Number of samples in transaction : 12, number of failing samples : 1
Response headers:
SampleResult fields:
ContentType:
DataEncoding: null
can any one suggest me regarding these issues..
I went by
Click to access jmeter_proxy_step_by_step.pdf
and created a test plan and also setup the proxy server
However when i navigate on my web app i dont see anything getting recorded under Recording controller, However i see the activity on View Results Tree under HTTP Proxy Server
Am i missing anything ?
I have previously worked in J meter and recorded my scripts in HTTP proxy server through LAN.
In this I use the port 8080 and “localhost” in my LAN setting and by deleting the cookie before I start recording.
In my home PC I have installed one application,there I have given the same setting but at the time of recording it is not taking anything under simple controller,but at the same time I have checked with Google it is working fine.
Please suggest me some proxy setting so that I can test the installed application in my home PC as-well.(NOTE:both the application run on IE)
Please help me on proxy thing. Actually in this article it is written that we have to change proxy to localhost, and when i am changing proxy to localhost in browser and recording test, i am getting connection timed out error in browser on recording, how to solve this problem, please tell me.
Thanks in advance.
Hi frnds,
I am new to jmeter. i am facing a prblm while recording the script..i.e my application url is like this ex:
https://198.66.27.5/abcd/
….jmeter is not able to record this url.
Either it is due to url consists of ip address in it or due to some other reason?
i am getting below error:
java.net.ConnectException: Connection timed out: connect
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at sun.security.ssl.BaseSSLSocketImpl.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sample(HTTPJavaImpl.java:483)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1018)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:236)
please help me out frnds.
thanks and regards,
Nitesh
Hi Friends,
I am new to Jmeter, and we are planning to implement Jmeter in my company
Anyone please help me on this issue
My question is JMeter is not able to record.
Steps to be followed:
1- adding one threadgroup under this add one Http default request
2- In Http Request default my web server is “linupca19.hewitt.com” and port is 3128
3- Then I add one HTTP proxy server and port is 8080 (by default I marked) my IE browser whose ip is 10.229.11.160 and port is 8080.
When I start its not recording
I followed the exact steps mentioned above and I am getting this error on running . I have tried with different browsers too, but everytime m encountering this error
-jmeter.protocol.http.proxy.Proxy: Problem with SSL certificate? Ensure browser is set to accept the JMeter proxy cert: Connection closed by remote host
Can any one help me out to resolve the issue…
From past few days I have been trying hands on JMeter, and I have been able to record and play HTTP traffic for an application hosted inside my organization.
However, when using the same proxy settings to record HTTP traffic for an application on web (outside my organization, e.g
http://www.google.com
), I am getting connection exception as below:
org.apache.http.conn.HttpHostConnectException: Connection to
http://www.google.com
refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:284)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:212)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
… 9 more
I tried to search for this error on several forums, where one person suggested me to record such application using Badboy tool, and then import it to JMeter. I tried the same, but while executing the test plan recorded by Badboy, I am getting the following error:
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sample(HTTPJavaImpl.java:487)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1064)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:426)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255)
at java.lang.Thread.run(Unknown Source)
Request you to kindly spare some time from your busy schedule and help me resolve this exception, your inputs would be highly appreciated.
Kindly let me know in case you require any other information around the same.
trialbuyfire
:
Thanks for the great post! Worked like a champ once I got past SSL issues. Just had to import and trust the certs from the remote server and I was able to record a form post with file upload.This proxy is a neat feature!
Can you tell me how to solve SSL issues
sujji
:
trialbuyfire
:
Thanks for the great post! Worked like a champ once I got past SSL issues. Just had to import and trust the certs from the remote server and I was able to record a form post with file upload.This proxy is a neat feature!
Hi,Can you tell me how to solve SSL issues
I am also facing SSL Certificate exception while recording HTTPS traffic. Request you to kindly share how to resolce these issues.
Thanks in advance.
I have recorded my script in jmeter and runned it.
It does not showed any errors. But actually if i check manually in my application,there is no reflect in application for the script runned through jmeter.
For ex: if my script contains flow as adding a product to cart, my application does not contain any products in cart, but there is no failures or errors in jmeter while running it.
Please some help me as soon as possible
1. My pc is on LAN with proxy setting 192.168.32.8 , port 8080 . google.com works fine. Jmeter is not running.
2. Jmeter is launched now . LAN setting : localhost , port: 8080 . . Test plan – thread group – http request – server name google.com port 8080 , implementation : httpclient4
3. View reults tree added
4. work bench – http proxy – port 8080 , target controller -testplan->threadgroup . Start proxy server.
5.Run – start – error : ” Response message: Non HTTP response message: Connection to
http://google.com:8080
refused ”
Please let me know where I have missed …
Thanks in advance
Hi, I am new using JMeter too. I have this problem. The app I want to test is inside a network and conects to another through a proxy (proxy:8080). I have followed all the steps to record a test and therefore changed de proxy configuration to (localhost:9090). I am able to record the test but when I reach a part of my app where the remote connection is needed the app doesnt work (because the proxy configuration needed to record the test doesnt work to connect outside my local network).
So, using proxy config for Jmeter –> my app doesnt work
using proxy confir for my app –> JMeter doesnt record test
Is it possible to record a test and at the same time use my own proxy configuration for my app?
Thaks.
If your site works in Chrome you can try bypassing JMeter’s HTTP proxy entirely by using the JMeter Chrome extension:
https://chrome.google.com/webstore/detail/blazemeter-the-load-testi/mbopgmdnpcbohhpnfglgohlbhfongabi
BlazeMeter is a paid service but you can use the chrome extension as much as you want with their free account.
Hi I am new to Jmeter.having following issue at the moment.
We have Http website with 6 pages and when we invoke 3rd page it will call https pages (4…6).
I am able to record till 3rd page but not from 4th page..
I have followed all jmeter docs but still no luck…
Any thoughts on this issue would appreciate much.
Regards
B Reddy
I am getting this error while i am trying to record the script through browser,anyone give me a solution… “Could not create script recording proxy-port in use.Choose another port.:Already used in JVM_Bind”
How to find another port number and what are the default port numbers to use to record a script
Im having problems recording some requests in my application.
When the proxy server is enabled, some of my requests are being executed correctly and recorded correctly, but for other requests the application is neither responding or even recording the actions.
The problem is only encountered when the proxy recorded is enabled.
HI All,
I have generated script in jmeter but i am not able to reun it ..
Anyone please let me know what mistake i have done .
Regards
shelendra
You will get all your answers on below link –
Jmeter Simple steps for recording Proxy test script in browser-
Jmeter Simple steps for recording Proxy test script in browser
I have problem for script recoring jmeter. I can’t able to record.
The following Steps to be followed:
1- adding one threadgroup under this add one Http default request in test plan
2- In Http Request default my internal web server
3- Then I add one HTTP proxy server and my firefox whose ip is 192.168.2.41 and port is 8092.
4. Then I start its not recording
Hello, I am trying to record script with “http(s) test script recorder”. It’s working properly and record the request until i keep “Capture HTTP Headers” checked. Since I want to keep header common with some variable throughout requests and wanted to put dynamic parameter I don’t want it to be recorded.
To do so, I remove that checkbox “http(s) test script recorder”, now none of my requests are getting recorded.
Please help me out.
371,623 views
Syndication
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here:
Cookie Policy
Recent Comments