<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yet another Tech Blog &#187; jMeter</title>
	<atom:link href="http://www.yatblog.com/category/jmeter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yatblog.com</link>
	<description>The freshest &#38; hottest solutions, not just pointless and endless discussions. Finally a tech blog you can use!</description>
	<lastBuildDate>Mon, 16 Feb 2009 18:36:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Test your Web Application&#8217;s Performance</title>
		<link>http://www.yatblog.com/2007/04/23/test-your-web-applications-performance/</link>
		<comments>http://www.yatblog.com/2007/04/23/test-your-web-applications-performance/#comments</comments>
		<pubDate>Mon, 23 Apr 2007 14:04:08 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[jMeter]]></category>

		<guid isPermaLink="false">http://www.yatblog.com/2007/04/23/testing-your-web-applications-performance/</guid>
		<description><![CDATA[Is it just me, or is like everyone these days developing some kind of web application on the side? Web applications really have arrived and are rapidly becoming even more popular than traditional desktop applications. There are numerous reasons why that&#8217;s the case:

No installation on client&#8217;s architecture needed (no maintenance on the client-side!)
Your application is [...]]]></description>
			<content:encoded><![CDATA[<p><img align="left" alt="Apache jMeter Logo" id="image175" title="Apache jMeter Logo" src="http://www.yatblog.com/wp-content/uploads/2007/04/logo.thumbnail.jpg" />Is it just me, or is like everyone these days developing some kind of web application on the side? Web applications really have arrived and are rapidly becoming even more popular than traditional desktop applications. There are numerous reasons why that&#8217;s the case:</p>
<ul>
<li>No installation on client&#8217;s architecture needed (no maintenance on the client-side!)</li>
<li>Your application is always up to date</li>
<li>You can use a various billing models (monthly, yearly, even per usage)</li>
</ul>
<p>But shifting away from an employee&#8217;s personal desktop or a local network server to some kind of web server (or a load-balanced server-farm) can cause some serious problems. Web apps tend to slow down the more people use them. One way to fight this (not directly, though), is using a sophisticated test tool. The testing itself won&#8217;t fix your web app&#8217;s performance issues, but it will provide you with a good and reliable way to measure performance while you&#8217;re tuning some aspects like the web or database server&#8217;s configuration. Getting more out of your servers really depends on how accurately you can measure the changes you&#8217;ve made to various configurations.</p>
<p>This is where Apache Jakarta&#8217;s jMeter comes into play. Commercial testing applications easily cost thousands of dollars and are often a nightmare to use, thus requiring training courses for their users to attend which make them even more expensive. Apache&#8217;s jMeter is an open-source application providing you with most features you will ever need to test your servers or applications. It&#8217;s usability also leaves some space for improvement, but hey, at least it&#8217;s free! In this tutorial we will create a simple, but effective web-stress test for an URL. JMeter is capable of doing a lot more than that, you can even test your web application&#8217;s GUI and the GUI&#8217;s results (although I recommend the much easier to use <a title="Badboy - Web Testing for the Masses" target="_blank" href="http://www.badboy.com.au/">Badboy</a> for GUI testing purposes). Here&#8217;s a screenshot of Badboy (only available for Windows):<a href="http://www.badboy.com.au/"><br />
</a><a class="imagelink" title="fsscreenshot" href="http://www.yatblog.com/wp-content/uploads/2007/04/fsscreenshot.png"><img id="image174" alt="fsscreenshot" title="fsscreenshot" src="http://www.yatblog.com/wp-content/uploads/2007/04/fsscreenshot.thumbnail.png" /></a></p>
<p>JMeter in my opinion is perfect for stress-testing your web app, so let&#8217;s take a look at the steps to do just that:</p>
<ol>
<li>Download and install jMeter from Apache&#8217;s Website    <a title="Apache jMeter" target="_blank" href="http://jakarta.apache.org/jmeter/index.html">here</a>. JMeter is Java application, so it will work on a wide variety of operating systems (get the binary zip, it should work for all platforms and make sure you&#8217;re running a decent Java Virtual Machine). I recommend not to use Windows for serious stress testing of higher-end servers due to Windows&#8217; TCP/IP concurrent connections limitations.</li>
<li>After firing up jMeter, you will be greeted by the following screen, change the name of “Test Plan” to something more meaningful.<br />
<a class="imagelink" title="1" href="http://www.yatblog.com/wp-content/uploads/2007/04/1.png"><img id="image162" alt="1" src="http://www.yatblog.com/wp-content/uploads/2007/04/1.thumbnail.png" /></a></li>
<li>Now add a Thread Group, which is just what it says, a group of threads, which we will use, to access our web app with simultaneous connections and thus creating the load.<br />
<a title="2" class="imagelink" href="http://www.yatblog.com/wp-content/uploads/2007/04/2.png"><img alt="2" id="image163" src="http://www.yatblog.com/wp-content/uploads/2007/04/2.thumbnail.png" /></a></li>
<li>After we added a Thread Group, we need to adjust it to our needs. Number of Threads specifies the amount of concurrent users. The ramp-up period specifies the period after which the full amount of users will access the web application. The loop count indicates how many cycles with those settings above should be run. In our example (50 * 10) this results in 500 users. This is a good amount to start with, it provides you with good details about your server&#8217;s performance but shouldn&#8217;t make it crash.<br />
<a title="3" class="imagelink" href="http://www.yatblog.com/wp-content/uploads/2007/04/3.png"><img alt="3" id="image164" src="http://www.yatblog.com/wp-content/uploads/2007/04/3.thumbnail.png" /></a></li>
<li>Let&#8217;s add an HTTP request sampler. As you can see, jMeter shows us a lot of other request sampler&#8217;s as well, like ftp, jMeter really shows, how flexible it is and that you can even stress-test ftp servers without much effort!<br />
<a class="imagelink" title="4" href="http://www.yatblog.com/wp-content/uploads/2007/04/4.png"><img id="image165" alt="4" src="http://www.yatblog.com/wp-content/uploads/2007/04/4.thumbnail.png" /></a></li>
<li>As we have added an HTTP request sampler, we now need to configure it. Under “server name” enter your URL (without the HTTP part). If you want to check the root folder of that URL, just enter forward slash (“/”) as the path.<br />
<a class="imagelink" title="5" href="http://www.yatblog.com/wp-content/uploads/2007/04/5.png"><img id="image166" alt="5" src="http://www.yatblog.com/wp-content/uploads/2007/04/5.thumbnail.png" /></a></li>
<li>The HTTP request sample is complete. We will now add a “Gaussian Random Timer” to the HTTP request. This will time the breaks between the connections in a more random fashion, so reflects the real world a lot better. Configure the Gaussian Random Timer according to the screenshot.<br />
<a title="6" class="imagelink" href="http://www.yatblog.com/wp-content/uploads/2007/04/6.png"><img alt="6" id="image167" src="http://www.yatblog.com/wp-content/uploads/2007/04/6.thumbnail.png" /></a><a title="7" class="imagelink" href="http://www.yatblog.com/wp-content/uploads/2007/04/7.png"><img alt="7" id="image168" src="http://www.yatblog.com/wp-content/uploads/2007/04/7.thumbnail.png" /></a></li>
<li>To see what&#8217;s happening, we need some reports! Let&#8217;s add a report with graphic visualization: Select “Graph Results”.<br />
<a title="8" class="imagelink" href="http://www.yatblog.com/wp-content/uploads/2007/04/8.png"><img alt="8" id="image169" src="http://www.yatblog.com/wp-content/uploads/2007/04/8.thumbnail.png" /></a></li>
<li>To see raw numbers (which is also great if you want to export your data to Excel and create your own custom reports and graphs, add “Aggregate Report”.<br />
<a title="9" class="imagelink" href="http://www.yatblog.com/wp-content/uploads/2007/04/9.png"><img alt="9" id="image170" src="http://www.yatblog.com/wp-content/uploads/2007/04/9.thumbnail.png" /></a></li>
<li>We&#8217;re done building our test plan. Hit Ctrl + R and run the thing! Your reports should look something like this:<br />
<a class="imagelink" title="11" href="http://www.yatblog.com/wp-content/uploads/2007/04/11.png"><img id="image173" alt="11" src="http://www.yatblog.com/wp-content/uploads/2007/04/11.thumbnail.png" /></a></li>
</ol>
<p>I hope this first tutorial really gets you started with jMeter. I&#8217;m planning on posting a lot more tutorials and tips about jMeter in the near future as I get to know it better myself. If you have any questions or want to give me some feedback, go ahead and post a comment.</p>
<p><a href="http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi"><br clear="left" /></a></p>
<p class="akst_link"><a href="http://www.yatblog.com/?p=161&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_161" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.yatblog.com/2007/04/23/test-your-web-applications-performance/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
