1
votes

I have created below setup in Jmeter to run recorded test cases.

  1. Added Thread Group to test plan.

  2. Added HTTP Request Defaults to thread group (in path section i have given url as 'http://localhost:8044')

    note: 'http://localhost:8044' is the url which i want to launch on firefox.

  3. Added Recording controller to thread group

In workbench Added HTTP(S) Test Script Recorder (In port section i have given 8080 as port no)

Now when I recorded test cases and played the test plan- test samples are failing with the following error.

Error: Response code: Non HTTP response code: java.net.ConnectException Response message: Non HTTP response message: Connection timed out: connect

Running this setup in virtual machine.I have tried with some other ports like 7070,8055,8044 but still getting same error.

Not sure where the issue is. Can any one please help me on this.

3
Port 8044 is not port 8080...arkascha

3 Answers

0
votes

You have to setup the proxy in the browser also with same port that you mentioned in Test Script Recorder

  1. 8044 port - is in which server is listening (HTTP Sampler port)
  2. 8080 port - is in which proxy server is listening (Test Script Recorder port)

Both are different. we need to configure proxy server port (which we specified in Test Script Recorder) in the browser setting also.

Note: If 8080 is already taken by some other process in your machine, try different port.

Setting up proxy in Firefox:

Options -> Advanced -> Network tab -> Settings button related to Connection -> enter port in Manual Proxy Configuration).

Follow the steps mentioned here:

  1. https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf
0
votes
  1. Add Thread Group to test plan.
  2. Add Transaction controller to thread group
  3. Add HTTP(S)Test Script Recorder to workbench

In HTTP(S)Test Script Recorder set global setting port to 8080,in target controller select the transaction controller in which you want to record the test click on start button before clicking start button you have to set proxy to record the script to do that go to firefox-option-Advanced-Network-Connection click on setting- select manual proxy config-in HTTP proxy give localhost and port 8080 and check the use this proxy server for all protocols .

This works for me.Check if 8080 port used by another process to do so in cmd type netstat -an

0
votes

The issue is resolved. Recording was not happening because of this.

Firefox default setting will bypass "localhost, 127.0.0.1" from proxy so your JMeter still not able to record it. You have to empty the "No Proxy for" field, by removing the "localhost, 127.0.0.1". Hope this will help.

I removed localhost, 127.0.0.1 from the no proxy field in firefox.

Got the fix from the link https://stackoverflow.com/a/37776363/4715839

Thanks all for sharing your comments.