World Of Software

Dedicated for testers and developers who want to improve the Quality and productivity in there work.
Home­Portal­Calendar­FAQ­Search­Memberlist­Usergroups­Register­Log in
Post new topic   Reply to topicShare | 
 

 Basics of Jmeter

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin


Number of posts: 7
Registration date: 2008-07-09

PostSubject: Basics of Jmeter   Mon Jul 14, 2008 11:41 am

JMeter is an Apache Jakarta project that can be used as a load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications.

Apache’s JMeter is an open source application providing you with many features.You will ever need to test your servers or applications. It’s usability also leaves some space for improvement, but at least it’s free! In this post we will create a simple, but effective web-load test and stress test for a Website. JMeter is able to do a lot of things more than that, you can even test your web application’s GUI and the GUI’s results. JMeter is perfect for load-testing the website, so let’s take a look at the steps to do just that:

1) Download and install JMeter from Apache’s Website
http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi here. Download the Binary zip file, it should work in all platforms and make sure that you are running on Java Virtual Machine. JMeter is Java application, so it will work on a wide variety of operating systems.


2) After installing the JMeter, you will be seeing by the following screen, change the name of “Test Plan” to something meaningful (like your website name or task name).


3) Now add a “Thread Group” to Test plan, Thread group is having a group of threads, which we will use, to access our web application simultaneously and thus creating the load.


4) We need to adjust Thread group to our needs. Number of Threads specifies the amount of concurrent users. The ramp-up period is the time taken to access the server by each thread. (Eg: 25 users (threads), ramp up period 120sec. then 120/25=4.8 sec. is the time taken by the user to access web application.



5) Add “Http Proxy Server” to “Work Bench”. By using this proxy server we will record URL’s. In Http proxy server patterns matching is there. By using pattern matching we will exclude/include URL’s. (When we will exclude images like .gif, .jpg, .css then we will reduce the burden of the system. Other wise access will be slow.)



6) Next we have to record URL’s from web application. First change the internet properties (proxy setting) Internet properties ->connections->LAN settings->use proxy server. Then only we can record


7)Click on the “Start” button in Http proxy server then open the web application and do what ever you want to test (load).After that click on the “Stop” button. Now we can see the entire URL’s from the web application in the Thread group.



8 ) To see what’s happening, we need some reports! Let’s Run the Test plan first. We can get result in reports by two ways:

1) Inserting “Listeners” (graphs, reports) to test plan and then run.

2) Create a log file of the test plan, by using the log file we can generate all graphs and reports. (By following this procedure we can export our data into Excel Sheet and create our own custom reports and graphs)

9) First we will see the first procedure. Let’s add a report with graphic visualization: Add “Graph Results” to Test plan. (Test plan->Add->Listeners->Graph Results)


10) To see Results in the form of numbers, Add “Aggregate Report” to Test plan.

(Test plan->Add->Listeners-> Aggregate Report)

11) We have done building our test plan. Select “Run” option or Press Ctrl + R to run the Test plan.

12) Your reports should look something like this:

13) From these reports we have to know Average Response time, Throughput, Standard deviation, Median. From These metrics we will judge the performance of the website.

14) We will see the second procedure to get reports. We have to insert “Access log sampler” to Thread group. (Thread group->Add->Samplers->Access log sampler)
In Access log sampler we have to set some values. Set server is the IP address of the system. (Eg: 192.168.0.39)Set the port. (Eg: 8080).Give the log file path (The file should be text file).


15) After that we have to insert “Aggregate report” to thread group. In that we have to give file name with .jtl extension. (That file will be the log file after running the test plan)


16) Now select the “Run” option or Press Ctrl + R to run the Test plan. Then log file will be created .We can open the file with excel then we can get all the test results in the excel format. Then we can analyze the results and performance of the website.

Quote:
This material was created by one of my friend
. So i just got that for the people who wants to learn JMeter. I am sure this will help people
Back to top Go down
View user profile http://testerworld.forumandco.com
 

Basics of Jmeter

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
World Of Software :: Software Testing-
Post new topic   Reply to topic