How would you go about automatically recording the your browser actions into JMeter?

This can be achieved by 2 ways.

Use BadBoy Tool, which is a tool to record your Web interactions.The recorded script can be exported as a JMeter file with the extension .jmx to be imported into JMeter. The generated script will not be pretty, but it can be cleaned up and further extended within JMeter with user defined variables, CSV data config, HTTP defaults, etc. You can record the script as you use your application.









Use JMeter as an HTTP proxy server to record your browser actions.Firstly, set up your JMeter to act as a proxy server on an available port like say 9090 as shown below.




Configure the proxy server as shown below:




Port: 9090
Target Controller indicates where to record. In the above diagram indicates to capture it in theWorkBench under the proxy server itself. This allows you to later on move the captured elements one by one into the TestPlan.
You don't want to capture everything. So, filter it with include and exclude patterns. For example, Include: .*myapp.*, Exclude: .*\.jpg.
"Start" the proxy server.

You need to set up your browser to use this proxy server.



Finally, start using the browser to record your actions. For example, you could use the following URL

http://myhost:7001/myapp/home 

Note: If you use localhost instead of myapp as the host, JMeter may not record your actions. To overcome this, type ipconfig on your DOS prompt and copy the local IP address and use that instead of localhost in your URL.

No comments:

Post a Comment