Sunday, 25 January 2015

Simple Jmeter Test Plan

Hi, this is my first post in jmeter hence like to start with preparing a simple jmeter test plan.

Now Consider a scenario where you asked to do performance testing of your website with 25 users.? the answer is to use Jmeter which is open source tool for doing performance testing and i hope you guys know how to install jmeter and how to start running simple test. assuming that you guys have basic knowledge in jmeter i will start showing how to write test script which will test website using 25 users, for that i will be using 'Rediff.com'.

Step 1: Once you open Jmeter you will see two things 1) test plan 2) Workbench now right click on Test Plan and add 'Thread Group'. Throup group is an element where you define number of users and your Thread Group should look like this.


Step 2: Right click on ThreadGroup and add 'HTTP request default', once done then in 'HTTP request default' add 'www.rediff.com' in 'Server name or IP' textbox.


Step 3: Again right click on ThreadGroup and add 'HTTP Request' and in Path mention the page name where you want to navigate.(See screenshot).


Step 4: You can add as many as HTTP Request you want and specify only path name in each HTTP request, in my case i have added one more HTTP request as shown below.


Step 5: Now add some listeners to view Test Execution report, I'm going to add three Listeners.


Step 6: Now Test script is ready to run but save it first by pressing 'Ctrl+s' on keyboard and it will pop up one window and give the appropriate name.



Step 7: Now you are ready to run your Test so click on 'Start' symbol and view the result by clicking on Listeners.



Step 8: If you see in 'View Results tree' listener all request marked in Green so it means it's a pass.:) and if any request is marked in Red then it's a fail.

Step 9: Now see the 'Graph results' you will see 'No of Samples' , 'Average', 'Deviation' and 'ThroughPut' and most important of these is 'Throughput'.
Throughput - Number of request processed by server in one minute and larger the Throughput the good is the performance of the server but in my case Throughput is very less but it is because of my slow Internet and Throughput depends on Internet speed too and if you run same test at your side then Throughput will be different.

Step 10: So this is how you can create simple Jmeter Script and now can add or remove elements based on your requirements.

I hope you are able to run the test plan..:)



No comments:

Post a Comment