0
votes

Recorded script getting failed while re-run the script

I have generated the script one month back and it was working fine and i got results also but today I tried to run the script from Jmeter its getting failed for all the steps. whether I have to do any setting before run the script?

1

1 Answers

0
votes

Connection refused message means that JMeter isn't able to connect the target website. If you can open the URL in browser, most likely you're sitting behind the corporate firewall and hence you'll need to perform some extra configuration to "tell" JMeter your proxy server details.

There are at least 3 ways of setting the proxy parameters for JMeter:

  1. Command line (via command-line arguments to JMeter script) like:

    jmeter -H your_proxy_server_IP_or_hostname -P your_proxy_server_port ....
    
  2. Using system.properties file. Add the next lines to the system.properties file:

    http.proxyHost=your_proxy_server_IP_or_hostname
    https.proxyHost=your_proxy_server_IP_or_hostname
    http.proxyPort=your_proxy_server_port
    https.proxyPort=your_proxy_server_port
    
  3. Basically the same as point 2, but aforementioned system properties are passed via -D command-line arguments:

    jmeter -Dhttp.proxyHost=your_proxy_server_IP_or_hostname -Dhttp.proxyPort=your_proxy_server_port ....
    

References: