Home > Performance Testing > JMeter > JMeter Sample Script: Configuration and Execution

JMeter Sample Script: Configuration and Execution

Prerequisite: User should have JMeter installed on machine. For installation of JMeter please refere this link: JMeter installation
Let us consider an example of testing societyhive support page for load of 10 users using JMeter.
Below are the steps for configuring and executing the script:
Step 1: Go to File -> Click on New. User will see a new Test Plan as shown in below image:

Image: New Test Plan

User needs to save the test plan with the desired name with .jmx extension as shown in the figure

Image: Save Test Plan

Step 2: Now, Thread Group should be added to the test plan. Using Thread Group any number of threads(users) can be added as per requirement. In this example, 100 threads will be added to Thread Group.
Below image will show how test plan looks after adding Thread Group:

Image: Add Thread Group

Step 3: Next step after adding Thread Group is to add HTTP request sampler. HTTP request sampler will send request to the server along with any essential parameters.
Below image will show how test plan looks once HTTP sampler is added.

Image: Add http Request Sampler

Step 4: After adding HTTP request sampler to the test plan user needs to configure the sampler according to the requirement.
In the ‘Server Name or IP’ field add ‘societyhive.com’.
In the ‘Path’ field add ‘Housing-Society-Software-Support’.
Script should look like this once above fields are added.

Image: Configure Test Plan

Step 5: Now we will be adding Listener to the script. Listener will show result of the script run to the user. There are various types of Listeners. In this example we will analyze the result using ‘View Results Tree’ listener.
Below image will show how test plan looks once ‘View Results Tree’ is added.

Image: View Results Tree Listener

Step 6: Once required components are added script can be executed. For executing the script, click on start button as shown in below image:

Image: Run Test Plan

Step 7: Once script is executed output can be seen using the Listener added. Sample output will look like this:

Image: Sample Output in Tree Format
This Article is TAGGED in . BOOKMARK THE permalink.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">