8

To record scripts in JMeter we need to run the proxy on local port 8080, where as in browser I need to configure for internet connectivity proxy to connect to internet.

The company I work for is providing me internet through a proxy server.

Anyone who knows how to record script using Jmeter while there is already internet proxy set up in the browser to connect to internet?

2 Answers 2

4

According to the JMeter documentation, if you want to run JMeter behind a proxy server, you should launch JMeter with the following settings:

-H [proxy server hostname or ip address] 
-P [proxy server port] 
-N [nonproxy hosts] (e.g. *.apache.org|localhost) 
-u [username for proxy authentication - if required] 
-a [password for proxy authentication - if required] 

Example : jmeter -H my.proxy.server -P 8000 -u username -a password -N localhost

Alternatively, you can use --proxyHost, --proxyPort, --username, and --password.

6
  • 1
    Thank you for your response, But I tried this already. My problem is to record a test in browser I need to change the proxy settings to my localhost port 8080, where as to connect to internet to load the site which I need to test I need to connect to proxy server like eg: 192.168.10.1. port 7070. Any idea on this ? Jul 25, 2013 at 13:05
  • Apologies; I did not read your question carefully enough. Are you asking how to change your browser's proxy settings? Or are you asking for a convenient way to switch your browser between two sets of proxy settings? Or something else?
    – user246
    Jul 25, 2013 at 13:12
  • Let me brief: 1.By default to connect to internet I need to configure for proxy server like 192.168.10.10 port 8080 (our company has set up authentication proxy for connecting to internet). 2.To record a test using Jmeter I need to run HTTP proxy server of Jmeter at local host port 8080. 3.When I reconfigure my proxy setting to record Jmeter test like localhost port 8080, I am disconnected from my internet. I need a way to record a test where there is a internet authentication proxy is set up. Jul 29, 2013 at 4:10
  • 1
    I apologise for the confusion, the authentication proxy we use will not ask for user name and password. the command jmeter -H my.proxy.server -P 8000 -N localhost worked fine Jul 29, 2013 at 11:06
  • @SureshKumar, So, problem is solved?
    – Pacerier
    Nov 6, 2015 at 11:05
0

Better use Jmeter Chrome extension, you can record and edit a JMeter Script without using JMeter and without configuring proxy settings. Extension provides some useful features:

  • Record Only Top Level Requests - excludes all JS/IMG requests.
  • Records HTTPS without SSL certificate configuring.
3
  • Bob, could you explain why you think the Chrome extension would work better than the accepted answer?
    – Kate Paulk
    Sep 24, 2013 at 11:40
  • Well, accepted answer works fine with HTTP but what if protocol is HTTPS?! You have to configure dummy certificate to record traffic. I started using extension as it takes too less time to do the same job.
    – Bob Meliev
    Sep 25, 2013 at 6:09
  • The extension being able to record HTTPS without needing to configure a dummy SSL certificate is a useful extra. It would also help to briefly say how the extension allows you to create JMeter scripts when you have an Internet proxy server that would conflict with JMeter's default settings.
    – Kate Paulk
    Sep 25, 2013 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.