Using the JMeter HTTP(S) Test Script Recorder:
By using the Recording Controller we can easily record the website navigation script and use it for the load testing. Now we see that step by step how you can use it-
Step 1: Need below software
Apache JMeter – Download and run the .bat/.sh file from the bin folder. (.bat for window & .sh for Linux)
Java 6 or later – Download and proper installation of Java.
Mozilla Firefox – Download and proper installation of Mozilla.
Step 2: Run the .bat/.sh file from the bin folder.
Step 3: Now build a test plan
- Add the Thread Group to Test Plan
– Right-click on Test Plan > Add > Threads (Users)
Number of Threads– Total number of users which we want to hit on the server.
For example: – here we will hit the 10 users at a time on the server.
Ramp-Up Period– Time given the next user to hit on the server.
For example: – Suppose we have 10 users (Number of Thread) and Ramp up period is 10. Then we are giving each user 1 second to hit the server.
Loop Count– We want to execute the same operation two times continuously then we need to increase the loop count as 1. It means 10 people will hit the server one time.
Step 4: Add the Recording Controller
- Right-click on Thread Group > Add > Logic controller > Recording Controller
Step 5: Add HTTP Request Defaults
- Right Click on Workbench –> Add–> Config Elements –> HTTP Request Defaults
- We are added the HTTP Request Defaults causes we will send the multiple request to the same web server.
HTTP Request Defaults contain the two important parts-
- Server Name or IP
- Port Number
Server Name or IP: Enter the url or IP address of the site on which you want to perform the load testing.
Port Number: Enter the default port number 8080.
Step 6: Add HTTP Test Script Recorder
- Right Click on Workbench–> Add–> Non-Test Elements –> HTTP Test Script Recorder.
Port: Fill the 9090 sometimes 8080 port is busy.
Target Controller: Add the place where you want to record the script. Here we choose –use recording controller.
URL Pattern to Include/Exclude: When the page is loaded then images are loaded, some are restricted so allow the all. “URL Patterns to Include”. This will create a blank entry.
Step 7: Setting of the browser proxy
- Open Firefox Browser.
- Click on Tools shown at the top menu.
- Click on Options shown under Tools
- Click on Network tab shown on the window after clicking Options.
- Click on Settings Button.
6. Click on Manual proxy configuration
7. Enter localhost and Port 9090.
8. Click ok button.
Step 8: Installation of the CA Certificate in the browser-
- When you click on the start button on the HTTP(S) Test Script Recorder then the below screen is appeared-
- Click on the ok button.
- Open the Mozilla Browser.
- Go to the tools > Option > Advanced > encryption > View certificate
- Click on the view certificates then below screen appear-
- Click on the import button and go to the bin folder and install the CA certificate-
- View the certificate and select the check box and click on the ok button.
- Click the all ok button.
Step 9: Now Record the Script
- Now enter the url in the browser and navigate the screen according you.
- After completion the navigation stop the recording from the HTTP Test Script Recorder.
Step 11: Now save the Test Plan
Step 12: Now Run the Test Plan
Step 13: After completed the process check the result-
- Aggregate Graph
- Aggregate Report
- Graph Result
- Summary Report
Please share your views….