JMeter Tutorial: Recording of script using Jmeter


Now we will see how to record script for the application whose performance is to be tested using Jmeter
Script can be recorded in two ways:
Using workbench
Using Test Plan
If you are beginner with Jmeter it is advisable to record in workbench and once you are sure about the recorded script it can be moved to test plan.
1) Add HTTP(s) Test Script Recorder in Workbench

17-1-https-test-script-recorder-in-workbench

2) Do the require settings in Test Script Recorder as mentioned below. Here we will record the script in Test Plan.

17-2-lan-settings-in-jmeter-for-test-script-recorder 17-3-jmeter-test-script-recorder
3) Click on “Start” button. Open the browser and hit the URL (Application under test) and click on the pages whose performance you need to test.

17-4-jmeter-test-script-recorder

Click on “OK”
4) After recording Click on “Stop” button.
17-5-stop-jmeter-test-script-recorder
This is how script looks after recording.
5) To Run the script make sure HTTP cookie Manager and HTTP Cache Manager are added in Jmeter So all the cookies and cache can be handled
6) Add the required listeners and Click on Green Arrow ( ) in menu bar
7) View Results Tree Listener will display the request , response in various formats
17-6-view-results-tree-listener-jmeter
17-7-aggregate-report-jmeter
8) Now apply Assertions to validate the response received.

17-8-assertions-jmeter

9) Add “Assertion Results” Listener to check the assertion

17-9-assertions-results-jmeter

10) Again execute the script by Clicking on Run icon

17-10-execute-script-jmeter

This shows the assertion has passed

Leave a comment

Your email address will not be published. Required fields are marked *