Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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.

share|improve this answer
    
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 ? –  Suresh Kumar Jul 25 '13 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 '13 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. –  Suresh Kumar Jul 29 '13 at 4:10
    
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 –  Suresh Kumar Jul 29 '13 at 11:06
add comment

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.
share|improve this answer
    
Bob, could you explain why you think the Chrome extension would work better than the accepted answer? –  Kate Paulk Sep 24 '13 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 '13 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 '13 at 11:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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