Script recording is very useful in Jmeter. If you want to test application load and performance testing. You can record scenario in Jmeter for Web and Mobile Application. In this note, I am going to discuss Jmeter Script recording for web application. You can do script customization after recording. I am doing following steps for script recording:
Step 1: first launch Jmeter by using Jmeter.bat under apache-jmeter-5.0\apache-jmeter-5.0\bin location.
Step 2: Now default TestpPlan will open in Jmeter. Rename this to As DefaultTest. It will look like this
Step 3: Now right click on DefaultTest and add -> Threads(Users) -> ThreadGroup. You can rename ThreadGroup to as you want. I am using name as ThreadGroup.
Under this thread group, you can customize this after script recording.
Step 4: Now right click on ThreadGroup > Add > Config Element > HTTP Request default, HTTP Cookie Manager, HTTP Cache Manager
Step 5: Now under workbench add >Non Test Elements > HTTP(S) Test Script Recorder. Now do following setting under Test Script recorder- set proxy port on your system and put same port under Port like 8888. Under Target Controller select above added ThreadGroup. In Grouping select “Put each group in new controller”. In Request Filtering tab, Add Suggested Exclude under URL Pattern to Exclude.
Now make Sure you step-up proxy successfully.
Step 6: Add listener for result (request and response). Like right click on thread Group > Listener > aggregate report, View Result tree
Step 7: Click on Start. Open any website. Do something on website. You can see in Jmeter Script, whatever you are doing on Website, Jmeter is recording.
Step 8: Click on Stop.
This is simple flow to record a script. In Next Note, I will update, how we can customize recorded script.