Load testing is often delayed until a Web application is near the final stages of development. This is a dangerous practice because the later a problem is found, the more difficult and costly it is to fix. For example, imagine that you just learned that one of your site’s servlets-- a servlet that you developed months ago and that many other servlets depend upon-- cannot handle more than 10 users at once. Fixing the problem now can be anywhere from difficult to disastrous. This problem may signal a design or implementation problem (such as a poorly designed database or poorly designed objects). If so, fixing this problem could involve modifying your entire design or implementation strategy and redesigning and/or rewriting the entire application.
If you had tested this servlet immediately after it was written, you could have spotted this scalability problem immediately. As a result, you could have also spotted and reworked design and implementation flaws before they became widespread. Essentially, you could have prevented many problems that would be difficult and costly to fix.
That’s why we believe you should start performing load testing at the unit level. “Performing load testing at the unit level” means that each time you create or modify a dynamic site component (such as a specific customization option, or a “wish list” functionality), you should immediately test how well it performs with different types and amounts of user traffic. By starting load testing at the beginning of the development process, you can detect and fix problems before they become widespread, at the stage where it is easiest to do so. Performing load testing from the beginning of the development cycle is one way to improve load testing’s effectiveness. You can make it even more effective by overcoming some of the challenges that prevent traditional styles of load testing from adequately exposing the scalability problems on a site:
* Determining all scalability-related program failures: Load testing should not just measure load statistics like load rate, bandwidth, etc., but also report where user traffic could cause problems such as bottlenecks, program failures, and functionality problems.
* Creating a large number of different, realistic paths: Real users do not follow fixed paths; there is always some degree of randomness inherent in their behavior. Moreover, different types, amounts, and combinations of user paths through a dynamic site can result in different problems. This means that in order to perform thorough load testing, you need to create and execute countless numbers and combinations of different, realistic user paths. Manually specifying an adequate number and variety of different paths is not only tedious, but practically impossible-- even if you have a tool that simplifies the script-writing process.
* Creating the pages to test: Before you can test a page, it must be on your sever. You need to compile the program, perform all necessary initializations, transfer the program to your site, click through the site to set the necessary state variables, then manually add inputs to invoke the page. This can be time-consuming and tedious-- especially when you do it the amount of times required to invoke and test different paths through the site.
After explaining these challenges, the speaker will discuss and demonstrate methods of overcoming them while performing unit-level load testing. Then he will explain how these same strategies can be applied to improve the effectiveness of application-level (traditional) load testing. By the end of the session, attendees will learn how load testing can be performed at the stage where it yields the best results as well as how to perform load testing in the most effective manner possible.
As Instructional Systems Manager of ParaSoft, Vince Budrovich works closely with ParaSoft developers and customers to overlook and assure product quality and dependability. Budrovich has extensive experience working as a project manager, organizing and developing performance support materials for software products, and business systems analysis. Budrovich earned his Bachelor's Degrees in Economics and Political Science from the University of California Santa Barbara and his Master's Degree in Planning and Administration from San Francisco State University.