{"id":1478,"date":"2010-09-10T09:00:25","date_gmt":"2010-09-10T13:00:25","guid":{"rendered":"http:\/\/www.webperformanceinc.com\/load_testing\/blog\/?p=1478"},"modified":"2010-09-13T14:32:56","modified_gmt":"2010-09-13T18:32:56","slug":"the-purpose-of-load-testing","status":"publish","type":"post","link":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/09\/the-purpose-of-load-testing\/","title":{"rendered":"The Purpose of Load Testing"},"content":{"rendered":"<p><strong>Why am I doing this?<\/strong><br \/>\nEven a well-executed Load Testing effort may fail if it does not answer the right questions&#8230;or answer them in the right way. The &#8220;right questions&#8221; might appear obvious, such as &#8220;How many hits\/sec can the server handle?&#8221; Such questions, while well-intentioned, may not be the questions that really need to be answered. They may simply be the easiest questions to ask&#8230;and answer.<\/p>\n<p>From a higher-level strategic level, the real questions sound something like:<\/p>\n<p>1. Is this system ready to deploy?<br \/>\n2. Can we make this system available to another 350 users?<br \/>\n3. We deployed the system and the performance is terrible. Find out why and fix it!<br \/>\n4. The last time we ran a new advertising campaign, the web server crashed. Is it ready for the next one?<\/p>\n<p>Digging in a little deeper, these can be translated to:<\/p>\n<p>1. Will this new system meet the expected performance goals for the intended deployment?<br \/>\n2. Can this existing system meet the expected performance goals if the user base is increased by NNN users?<br \/>\n3. We already know the system can not meet the expected performance goals. Replicate the problem so the developers can fix it&#8230;.Then see #1.<\/p>\n<p>If you read those carefully, there is really one question &#8211; Will the system meet the expected performance goals? Now, you may be asking: Isn&#8217;t that where we started &#8212; with a question like &#8220;How many hits\/sec can the server handle?&#8221;. Yes and no. Yes, those questions sound a lot alike. But instead of getting distracted with metrics like hits\/sec, we are now thinking in terms of performance goals. &#8220;But isn&#8217;t hits\/sec a performance goal?&#8221; Yes, but not a very useful one. It is easy to collect and measure, but with few exceptions, it doesn&#8217;t tell us enough about the user experience. And THAT is what most load tests should be trying to measure: the user experience. In the end, the system performance will be defined by the user experience. The number of hits\/sec is irrelevant to the users &#8211; they care about how the system feels. So, a load test should determine if the performance goals are met&#8230;and the performance goals should reflect an acceptable user experience.<\/p>\n<p>Now let&#8217;s get back to the subject of this article &#8211; &#8220;The Purpose of Load Testing&#8221;. In most cases, the purpose of load testing should be to determine if the system will meet the performance goals under the expected usage scenarios.<\/p>\n<p>So&#8230;if not hits\/sec, what are the performance goals? From the users perspective, it is how long it takes to complete a given task. As the user attempts to complete a task, they will divide their time among a few primary activities:<\/p>\n<p>1. Figure out how to accomplish the next step in the task<br \/>\n2. Perform the step<br \/>\n3. Wait for the step to complete<\/p>\n<p>#1 is characterized by reading the page to determine what comes next. In many systems, #2 is data entry and pressing the submit button. Collectively, #1 and #2 are generally referred to as think time. Note that the use of AJAX techniques may appear to blur the lines between 2 and 3 a little &#8211; since each step can become a much smaller unit. But the principle still applies &#8212; just at a smaller scale.<\/p>\n<p>While #1 and #2 are certainly important to the user experience &#8211; they are defined by the design of the user interface and how fast the user is working &#8212; and therefore mostly outside of the area of performance testing. When load testing, we are primarily interested in the duration of #3 &#8211; where the user is waiting for a result from the server. This is generally referred to as <em>page duration<\/em> or <em>page load time<\/em>. This measurement is by far, the most valuable data we can collect to determine the user experience.<\/p>\n<p>The second most valuable data we can collect is the number of errors encountered. An error can be any time a step in the task results in an unexpected, incorrect or undesirable result&#8230;such as &#8220;connection refused&#8221;, &#8220;server too busy&#8221; or &#8220;unexpected application error&#8221;.<\/p>\n<p>Returning again to the subject of this article, what is &#8220;The Purpose of Load Testing&#8221;?<\/p>\n<p>The purpose of Load Testing is to simulate a realistic user load and measure the user experience to determine if the performance goals are met.<\/p>\n<p>That was a really long-winded discussion to arrive at a simple answer for a seemingly simple question. Nonetheless, I&#8217;m frequently confronted by testers (and managers) that are focused on some metric, like hits\/sec or time to first byte, and miss the bigger picture &#8211; what is the user experiencing? So I think it is very important to approach the problem with the right purpose in mind.<\/p>\n<p>Now, determining the numbers that go with the performance goals are&#8230;well, that can be a challenge all on it&#8217;s own. Hopefully your user representative or project manager is prepared to answer those questions. You should be looking for answers like:<\/p>\n<ul>\n<li>90% of the pages should load within 6 seconds<\/li>\n<li>At 90% of the maximum expected load, there should be 0 errors<\/li>\n<li>At the maximum expected load, no more than 1% of pages should result in errors<\/li>\n<\/ul>\n<p>The answers may be simpler or more complex, but there must be specific numbers assigned to the goals&#8230;otherwise there is no way to determine if the tests indicate a system that passes or fails to meet the goals.<\/p>\n<p>Now that we know why we are testing, next time I will share some thoughts on choosing what to test.<\/p>\n<p>Test early, test often!<\/p>\n<p>Chris, Engineer at Web Performance<\/p>\n<p>Note: If you&#8217;ve made it this far, it probably doesn&#8217;t apply to you, but in the interest of completeness I will point out that there certainly are cases where determining specific metrics such as hits\/sec and MBytes\/sec are the end goal. In these cases, pursuing these metrics may take you down a path that is different from this series of articles. These are, however, less common.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why am I doing this?<br \/>\nEven a well-executed Load Testing effort may fail if it does not answer the right questions&#8230;or answer them in the right way. The &#8220;right questions&#8221; might appear obvious, such as &#8220;How many hits\/sec can the server handle?&#8221; Such questions, while well-intentioned, may not be the questions that really need to be answered. They may simply be the easiest questions to ask&#8230;and answer.<br \/>\nFrom a higher-level strategic level, the real questions sound something like:<br \/>\n1. Is this system ready to deploy?<br \/>\n2. Can we make this system available to another 350 users?<br \/>\n3. We deployed the system and the performance is &hellip; <a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/09\/the-purpose-of-load-testing\/\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1478","post","type-post","status-publish","format-standard","hentry","category-load-testing"],"_links":{"self":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/1478","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/comments?post=1478"}],"version-history":[{"count":8,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/1478\/revisions"}],"predecessor-version":[{"id":1532,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/1478\/revisions\/1532"}],"wp:attachment":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/media?parent=1478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/categories?post=1478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/tags?post=1478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}