2
votes

I had follow all the below given Steps. Please check and suggest me solution for this.

1.Create Thread Group.

2.HTTP Request(with Port 8080 and IP/Server Name as localhost.

3.HTTP Request Defaults(with Port 8080 and IP/Server Name as localhost).

4.Added Recording Controller.

5.Under Workbench created HTTP(s) Test Script Recorder

6.Updated URL patterns (.*.html).

7.Added View Result Tree.

8.Clicked on Start and install Root CA certificate(Click OK).

9.Set a Proxy in Firefox.

10.Firefox Option Advanced Network Setting. Check the Manual Proxy Configuration. HTTP Proxy: localhost and Port: 8080.

11.Check the "Use this Proxy Server for all Protocol". No Proxy for "localhost".

Finally I have did not see any script that has been recorded.

4
Use Port:8888 instead of 8080 .And use recorder from "Templates".Thats the easiest way to record - Adnan

4 Answers

2
votes

You Can Follow these below steps:

  1. Open Jmeter.

  2. Click on Templates... (File->Templates... )

  3. Just Click on "Create" button.

  4. Then open up your Firefox browser.

  5. Then Open Menu-> Options -> Advanced -> Network -> Connection Settings.

  6. Then configure just like this.

enter image description here

  1. Then just click OK.

  2. Start the HTTP(s) Test Script Recorder from Jmeter.

9.Now Install Root CA certificate.

  1. Restart your Firefox and you are just ready to record your test script.

You will find your recorded script under the "Recording Controller" section!!

Hope, this will help you. :)

1
votes

It might be the case you're trying to record secure (HTTPS) traffic.

  1. Make sure "Use this proxy server for all protocols" box is checked
  2. Make sure "No Proxy for" box is empty

Firefox Configuration

You can also consider an alternative recording approach - JMeter Chrome Extension - in that case you won't have to worry about proxies, SSL certificates, browser configuration, etc. - click one single button and you're all set.

0
votes

- In step #2, You don't need to specify anything in HTTP Requests, HTTP requests will be added automatically when you record your script successfully.

- In step #3, DO NOT use server name as "Localhost" and port number as JMeter's port. Only when you want to test HTTPS domains, you specify HTTPS as a protocol. Also, if you are testing an application that requires a specific port number (Example: htts://somedomain.com:9595/somepath/) you specify the Server/IP Name and the PORT in the HTTPS Default.

- In step #5, you specify JMeter port number (8080 or 8888 or...), and chose "Target Controller" to "Use Recording Controller". You will find recorded script in Recording Controller when you expand it after recording is done.

- In step #10, use the same port number you specified in step #5.

0
votes

For me, the solution was to create an alias for 127.0.0.1 in /etc/hosts:

127.0.0.1 myserver

and create the JMeter script from the Recording template as detailed at https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.html, specifying "myserver" as the host (instead of www.example.com).

Also, if your backend listens on a specific port, you have to specify that port in the "HTTP Request Defaults", under "Port Number".