{"id":1282,"date":"2010-08-24T10:25:07","date_gmt":"2010-08-24T14:25:07","guid":{"rendered":"http:\/\/www.webperformanceinc.com\/load_testing\/blog\/?p=1282"},"modified":"2010-08-24T10:25:07","modified_gmt":"2010-08-24T14:25:07","slug":"how-to-develop-a-robust-load-testing-plan","status":"publish","type":"post","link":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/08\/how-to-develop-a-robust-load-testing-plan\/","title":{"rendered":"How to Develop a Robust Load Testing Plan"},"content":{"rendered":"<p>When I first started writing test cases with Load Tester, I found it  easy to fall into the psychological trap of writing functional test  cases.\u00a0 But load testing requires a different approach, and inadequate  tests can cost you time and <a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/06\/faster-websites-are-more-profitable\/\">money<\/a>.<\/p>\n<p>Functional test cases (such as the unit tests popularized by JUnit) confirm the correctness of a system.\u00a0 These tests should be highly specific and have excellent <a href=\"http:\/\/en.wikipedia.org\/wiki\/Code_coverage\">code coverage<\/a>.\u00a0 A good engineer approaches functional testing as though she were designing a jet engine: if any screw, flange, or circuit fails then the entire system is completely worthless.<\/p>\n<p>Load tests should be designed to imitate the swarming behavior of real users.\u00a0 When load testing, we do still want to have good code coverage, but load tests that are inspired by your web application&#8217;s internal component structure may not provide the timely insights you need.<\/p>\n<p>For example, the first test case I ever wrote simply logged into a piece of blogging software, and then immediately logged out.\u00a0 That was a very simple test that exercised a specific feature of the application.\u00a0 But it wasn&#8217;t representative of what a user would typically do.\u00a0 Load testing should start with the most ordinary behavior that we expect from our users.<\/p>\n<p>A typical user would arrive at a blog either through a google search, a link from another blog, or from his RSS reader.\u00a0 He would likely be interested in a specific piece of information, which he would read and then he might follow any prominent links, such as on a list of &#8220;recent comments&#8221; or the title link to the front page.<\/p>\n<p>Intuitively, testing only common cases will feel like less than due diligence.\u00a0 But if you spend two weeks writing up a comprehensive suite of test cases for 10,000 users only to discover a server misconfiguration that causes your site to fall over at 40 users, then that&#8217;s two weeks during which your engineers weren&#8217;t solving a critical problem with your installation.<\/p>\n<p>Once a website passes the first gauntlet, we want to add cases that reveal bottlenecks, namely: <a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/05\/what-is-web-bandwidth-and-how-do-you-test-it\/\">bandwidth<\/a>, <a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/03\/persistent-connections-performance\/\">TCP connections<\/a>, server cpu, server memory, and <a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/05\/load-testing-tips-for-database-administrators\/\">database concurrency limitations<\/a>.\u00a0 But even at this stage, only test cases that are founded on natural use patterns will reveal the most pressing problems.<\/p>\n<p>In summary, a strong load testing plan follows this rough schedule:<\/p>\n<ol>\n<li>Start with a very small selection of the most frequently used scenarios.\u00a0\u00a0 Deliver results to your engineers ASAP.<\/li>\n<li>After meeting basic performance goals, expand the scope of your test cases to capture a spread of common use cases.<\/li>\n<li>Add administrative functions or batch-processing jobs that could plausibly have a performance impact.<\/li>\n<li>Continue adding functions and edge cases as budget and schedule allows.<\/li>\n<li>Remember to re-test after each change to your system&#8217;s configuration.<\/li>\n<\/ol>\n<p>Lane,<\/p>\n<p>Engineer at Web Performance.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I first started writing test cases with Load Tester, I found it  easy to fall into the psychological trap of writing functional test  cases.\u00a0 But load testing requires a different approach, and inadequate  tests can cost you time and <a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/06\/faster-websites-are-more-profitable\/\">money<\/a>.<br \/>\nFunctional test cases (such as the unit tests popularized by JUnit) confirm the correctness of a system.\u00a0 These tests should be highly specific and have excellent <a href=\"http:\/\/en.wikipedia.org\/wiki\/Code_coverage\">code coverage<\/a>.\u00a0 A good engineer approaches functional testing as though she were designing a jet engine: if any screw, flange, or circuit fails then the entire system is completely &hellip; <a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2010\/08\/how-to-develop-a-robust-load-testing-plan\/\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":53,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1282","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\/1282","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\/53"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/comments?post=1282"}],"version-history":[{"count":22,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/1282\/revisions"}],"predecessor-version":[{"id":1388,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/1282\/revisions\/1388"}],"wp:attachment":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/media?parent=1282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/categories?post=1282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/tags?post=1282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}