Friday 27 May 2016

Creating First JMeter Script


In our previous and third post of JMeter, we have discussed about two main component required for creating a JMeter script. Follow the previous post first, if you are new to JMeter and have not seen that post.

So now I can hope that you have setup the JMeter on your machine to start with this session.

There are two default components you will see, when you will start the JMeter:

  1. Test Plan, and
  2. WorkBench

Test Plan describes the series of steps JMeter will execute when run whereas Work Bench is a temporary space provided to store test elements not in use, for copy/paste option or any other purposes you desire. While saving the test plan, workbench elements are not saved with it until you select the ‘Save Workbench’ option.

To start with creating your first JMeter script, follow the following steps:

  1. Add a ‘Thread Group’ to the ‘Test Plan’
  2. Now add ‘HTTP(S) Test Script Recorder’ to the ‘WorkBench’
  3. Set the browser and ‘HTTP(S) Test Script Recorder’ to one free port
  4. Also select the ‘Target Controller’ before starting the ‘HTTP(S) Test Script Recorder’
  5. Now perform the user actions and all the requests will be recorded under the selected target controller

See the following screenshot for better understanding:















You can see that I have selected ‘CrazzyGig Thread Group’ in the ‘Target Controller’, so all the recorded requests will be saved under the ‘CrazzyGig Thread Group’. 

This is just the simple recording of the steps performed by the user, In next we see the script recording in more detail that way we can reuse the same scripts without any modification in scripts.

Please like and comment if you liked the post.  Stay tuned to see more posts.



No comments:

Post a Comment