Load Testing Web Perform
Load Testing Web Perform
to Predict
Web Performance
White Paper
Abstract
Businesses that are leveraging the Web to conduct daily transactions need to provide
customers with the best possible user experience in order to be successful. Often, how-
ever, these businesses lose customers because their sites are not able to handle surges
in Web traffic. For example, a successful promotion that drives Web traffic can radi-
cally impact system performance. Online customers, tired of waiting, will simply click
to competitors’ sites, and any opportunities for revenue growth will be lost.
3
Load Testing White Paper
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
Ensuring Optimal End-user Experience—A Complex Issue . . . . . . . . . . . . . . . . .6
Application Load Testing Prior to Going Live . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Challenges of Automated Load Testing Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
The Process of Automated Load Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Mercury Interactive’s LoadRunner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
About Mercury Interactive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
5
Load Testing White Paper
Introduction
In the last few years, e-business has grown at an accelerated rate. Today, analysts esti-
mate that 260 million people use the Internet—and there is little sign that this growth
will slow down. In fact, the International Data Corporation expects the number of
online users to reach 500 million within the next two years.
E-business has become a popular commercial medium for two reasons: it enables busi-
nesses to share information and resources worldwide, and it offers them an efficient
channel for advertising, marketing and e-commerce. By using the Internet, businesses
have been able to improve their sales and marketing reach, increase their quality assur-
ance to customers and conduct multimedia conversations with customers.
Publishing/subscribers sites provide the user with media information, such as magazine and
newspaper publications. Although the total number of concurrent users is generally low on
these sites, the number of individual transactions performed on a per user basis is relatively
high, resulting in the largest number of page views of all site categories.
Online shopping sites allow users to browse and shop for anything found in a tradi-
tional brick-and-mortar store. Traffic is heavy, with daily volumes ranging between one
and three million hits per day.
Customer self-service sites include banking and travel reservation sites. Security con-
siderations (e.g., privacy, authentication, site regulation, etc.) are high.
Trade/auction sites allow users to buy and sell commodities. This type of site is volatile,
with very high transaction rates that can be extremely time-sensitive.
No matter the transaction type, Web sites must enable customers to conduct business in
a timely manner. For this reason, a scalable architecture is essential.
6
Load Testing White Paper
and capacities of individual components within each tier. Figure 1 illustrates the com-
plexity of these components.
Internet
This complexity prompts many questions about the integrity and performance capabili-
ties of a Web site. For instance, will the response time experienced by the user be less
than 8 seconds? Will the Web site be able to sustain a given number of users? Will all
the pieces of the system, in terms of interoperability, co-exist when connected together?
Is communication between the application server and the database server fast enough?
Is there sufficient hardware on each tier to handle high volumes of traffic?
To eliminate these performance issues, businesses must implement a method for predicting
how Web applications will behave in a production environment, prior to deployment.
Application load testing is the measure of an entire Web application’s ability to sustain
a number of simultaneous users and/or transactions, while maintaining adequate
response times. Because it is comprehensive, load testing is the only way to accurately
test the end-to-end performance of a Web site prior to going live.
• Emulate hundreds of thousands of manual users that will interact with the application
to generate load
• Coordinate the operations of users
• Measure response times
• Repeat tests in a consistent way
• Compare results
7
Load Testing White Paper
Because load testing is iterative in nature, testers must identify performance problems,
tune the system and retest to ensure that tuning has had a positive impact—countless
times. For this reason, manual testing is not a very practical option.
With automated load testing tools, tests can be easily rerun and the results automati-
cally measured. In this way, automated testing tools provide a more cost-effective and
efficient solution than their manual counterparts. Plus, they minimize the risk of human
error during testing.
Today, automated load testing is the preferred choice for load testing a Web application.
The testing tools typically use three major components to execute a test:
• A control console, which organizes, drives and manages the load
• Virtual users, which are processes used to imitate the real user performing a business
process on a client application
• Load servers, which are used to run the virtual users
This advanced functionality in turn allows testers to save time and costly resources.
Internet
Manual Testers
Control Console
Fig. 2. Manual testers are replaced by a single console controlling several thousand virtual users
Automated testing tools recently demonstrated their value in a report by the Newport
Group. The report, published in 1999, revealed that 52 percent of Web-based businesses
did not meet their anticipated Web-based business scalability objectives. Of this group,
60 percent did not use any type of automated load testing tool. In contrast, nearly 70 percent
of businesses that met their scalability expectations had used an automated load testing tool.
8
Load Testing White Paper
Automated load testing tools must address all aspects of accuracy and scalability and be
able to pinpoint problems in order to ensure reliable end-to-end testing. Listed below
are some key attributes of accuracy and scalability.
Accuracy: Scalability:
9
Load Testing White Paper
First, the tester must identify all key performance goals and objectives before executing
any testing strategies. Examples include identifying which processes/transactions to test,
which components of a system architecture to use in the test and the number of concur-
rent connections and/or hits per second to expect against the Web site, as well as
clarifying which processes are to be tested.
By referring to the four models of Web sites (see page 6), developers can easily classify
their site’s process/transaction type, allowing users to conduct transactions in a more
timely fashion. For example, a business-to-consumer model can implement an online
shopping process in which a customer browses through an online bookstore catalog,
selects an item and makes a purchase. This process could be labeled “buy book” for the
purposes of the test. Defining these objectives will provide a concise outline of the
SLAs and mark the goals that are to be achieved with testing.
Second, the tester needs to define the input data used for testing. The data can be cre-
ated dynamically. For example, auctioning bids may change every time a customer sends
in for a new request. Random browsing also may be used to obtain the data. Examples
include any non-transactional process, such as browsing through a brochure or viewing
online news. Emulating data input can avoid potential problems with inaccurate load
test results.
Third, testers must determine the appropriate strategy for testing applications. They can
select from three strategy models: load testing, stress testing and capacity testing. Load
testing is used to test an application against a requested number of users. The objective
is to determine whether the site can sustain this requested number of users with accept-
able response times. Stress testing, on the other hand, is load testing over extended
periods of time to validate an application’s stability and reliability. The last strategy is
capacity testing. Capacity testing is used to determine the maximum number of concur-
rent users an application can manage. For example, businesses would use capacity
testing to benchmark the maximum loads of concurrent users their sites can sustain
before experiencing system failure.
10
Load Testing White Paper
Fourth, testers need to cultivate a solid understanding of the system architecture, including:
• Defining the types of routers used in the network setup
• Determining whether multiple servers are being used
• Establishing whether load balancers are used as part of the IP networks to manage the servers
• Finding out which servers are configured into the system (Web, application, database)
Last, developers must determine which resources are available to run the virtual users.
This requires deciding whether there is a sufficient number of load generators or test
machines to run the appropriate number of virtual users. It also requires determining
whether the testing tool has multithreading capabilities and can maximize the number
of virtual users being run. Ultimately, the goal is to minimize system resource consump-
tion while maximizing the virtual user count.
It is necessary to identify and record all the various business processes from start to fin-
ish. Defining these transactions will assist in the breakdown of all actions and the time
it takes to measure the performance of a business process.
Think times can vary in accordance with different user actions and the user’s level of
experience with Web technology. For example, novice users require more time to exe-
cute a process because they have the least experience using the Web. Therefore, a tester
will need to emulate more think time in the form of pauses. Advanced users, however,
have much more experience and can execute processes at an accelerated level, often by
using shortcuts.
System response times also can vary because they are dependent on connection speed, and
all users connect to the Web system at different speeds (e.g., modem, LAN/WAN). This
feature emulates dial-up connections over PPP at varying modem speeds (e.g., 28.8 Kbps,
56.6 Kbps, etc.) and is useful for measuring application response times based on the
connection speed.
Error handling is another setting that requires configuration. Errors arise throughout the
course of a scenario and can impede the test execution. The tester can configure virtual
users to handle these errors so that the tests can run uninterrupted.
11
Load Testing White Paper
In order to run a successful scenario, testers must first define individual groups based on
common user transactions. Second, they need to define and distribute the total number
of virtual users. A varying number of virtual users can be assigned to individual business
processes to emulate user groups performing multiple transactions.
Third, testers must determine which load generating machines the virtual users will run
on. Load generator machines can be added to the client side of the system architecture
to run additional virtual users. Last, testers need to specify how the scenario will run.
Virtual user groups can either run in staggered or parallel formation. Staggering the vir-
tual users allows testers to examine a gradual increase of the user load to a peak.
Step 5: Running the Load Test Scenario and Monitoring the Performance
Real-time monitoring allows testers to view the application’s performance at any time
during the test. Every component of the system requires monitoring: the clients, the
network, the Web server, the application server, the database and all server hardware.
Real-time monitoring allows for early detection of performance bottlenecks during test
execution. Testers then have the ability to view the performance of every single tier,
server and component of the system during testing. As a result, testers can instantly
identify performance bottlenecks during load testing. They then can accelerate the test
process and achieve a more stable application.
Fig. 5. This is a generic graph showing performance under load. This graph is useful in pinpointing bottle-
necks. For example, if a tester wants to inquire about the user threshold at 2 seconds, the results above
show a maximum of 7,500 concurrent users.
12
Load Testing White Paper
Fig. 6. This graph is a generic display of the number of transactions that passed or failed. In the above exam-
ple, if the goal is to obtain a 90-percent passing rate for the number of transactions, then transaction 2 fails.
Approximately 33 percent out of 100 transactions failed.
LoadRunner enhances every step of the load testing process to ensure that users reap
the maximum return on their investment in the tool. The remainder of this paper dis-
cusses how LoadRunner offers support for each segment of the load testing process:
13
Load Testing White Paper
sending various e-business protocol requests to the server. VUGen also can record
against Netscape or Internet Explorer browsers—or any user-defined client that provides
the ability to specify a proxy address. After the recording process, a test script is generated.
Fig. 7. The Virtual User Generator allows testers to capture business processes to create virtual users
You can then add logic to the script to make it more realistic. Intelligence can be added
to the scripts so that they emulate virtual user reasoning while executing a transaction.
LoadRunner executes this stage using the transactions, as well as its verification and
parameterization features.
14
Load Testing White Paper
Fig. 8. The run-time settings are used to emulate the real user as closely as possible. In this example, think
time is randomly generated to simulate the speed at which the user interacts with the system.
Think time: Controls the speed at which the virtual user interacts with
the system by including pauses of think times during test
execution. By varying think times for users, LoadRunner
can emulate the behaviors of different users—from novice
to expert users.
Browser emulation: Enables the tester to specify which browser the virtual user
emulates. LoadRunner supports both Netscape and Internet
Explorer, as well as any custom browser.
Number of connections: Allows the virtual user to control the number of connections
to a server, like a real browser, for the download of Web
page content.
15
Load Testing White Paper
Error handling: Regulates how a virtual user handles errors during script
execution. LoadRunner can enable the Continue on Error
feature when the virtual user encounters an error during replay.
Fig. 9. LoadRunner’s Controller is an interactive environment for organizing, driving and managing the load
test scenario
The Controller facilitates the process of creating a load test scenario by allowing users to:
16
Load Testing White Paper
The schedule also manages scheduling and features an automated process that allows
the user to run the script without being present. In real time this would be analogous to
running a script during off-peak hours of Internet traffic—6:00 p.m. to 6:00 a.m. To
schedule a test, the user simply has to click the Run Scenario button and enter the
desired starting time.
TurboLoad also can generate more hits/sec for a given machine. LoadRunner’s replay
speed can thereby generate more throughput against the server using a minimum
amount of resources.
Step 5: Running the Load Test Scenario and Monitoring the Performance
Once the scenario is built, the tester is ready to run the test. LoadRunner’s Controller
provides a suite of performance monitors that can monitor each component of a multi-
tier system during the load test. By capturing performance data over the entire system,
testers can then correlate this information with the end-user loads and response times
in order to pinpoint bottlenecks. LoadRunner provides performance monitors for the
network, network devices and the most common Web servers, application servers and
database servers. The performance monitoring is done in a completely non-intrusive
manner to minimize performance impact. Additionally all of these monitors are hard-
ware and OS independent, as no agents are required to be installed on the remotely
monitored servers.
17
Load Testing White Paper
Fig. 10. LoadRunner online monitors help identify and isolate performance bottlenecks in real time
Web Server Resource Graphs: Hits per Second, Throughput, Apache, MS IIS,
Netscape
18
Load Testing White Paper
Fig. 11a. Results of a dot.com using LoadRunner Fig. 11b. Results of the same company using
Analysis before making any adjustments to the system LoadRunner Analysis after making enhance-
infrastructure. The site reached a peak of 4,000 Vusers ments to the performance of the system. The
before any performance degradation. number of Vusers increased five fold to a
peak of 20,000.
Below are sample graphs that LoadRunner Analysis provides testers as it solves complex
bottleneck issues.
• Running virtual users. Displays running virtual users during each second of a scenario.
• Rendezvous. Indicates when and how virtual users were released at each point.
Fig. 12. This activity graph displays the number of completed transactions (successful and unsuccessful) per-
formed during each second of a load test. This graph helps testers determine the actual transaction load on
their system at any given moment. The results show that after six minutes an application is under a load of
two hundred transactions per second.
19
Load Testing White Paper
• Performance under load. Indicates transaction times relative to the number of virtual
users running at any given point during the scenario.
• Transaction distribution. Displays the distribution of the time taken to perform a transaction.
Fig. 13. This performance graph displays the number of transactions that passed, failed, aborted or ended
with errors. For example, these results show the “Submit_Search” business process passed all its transac-
tions at a rate of approximately 96 percent.
Fig. 14. This performance graph displays the minimum, average and maximum response times for all the
transactions in the load test. This graph is useful in comparing the individual transaction response times in
order to pinpoint where most of the bottlenecks of a business process are occurring. For example, the results
of this graph show that “FAQ” business process has an average transaction response time of 1.779 seconds.
This would be an acceptable statistic in comparison to the other processes.
20
Load Testing White Paper
• Connections per second. Shows the number of connections made to the Web server
by virtual users during each second of the scenario run.
• Throughput. Shows the amount of throughput on the server during each second of
the scenario run.
Fig. 15. This Web graph displays the number of hits made on the Web server by Vusers during each second
of the load test. This graph helps testers evaluate the amount of load Vusers generate in terms of the num-
ber of hits. For instance, the results provided in this graph indicate an average of 2,200 hits per second
against the Web server.
Fig. 16. This Web graph displays the amount of throughput (in bytes) on the Web server during the load test.
This graph helps testers evaluate the amount of load Vusers generate in terms of server throughput. For
example, this graph reveals a total throughput of over 7 million bytes per second.
21
Load Testing White Paper
Fig. 17. This graph correlates the relationship of the system behavior to the number of users, using a compi-
lation of results from other graphs. This enables the tester to view the CPU consumption based on the total
number of users.
Summary
In a short time, e-business has proven to be a viable business model for dot.coms and brick-
and-mortars alike. With the number of Internet users growing exponentially, it is therefore
critical for these businesses to prepare themselves for high user volumes. Today’s businesses
can leverage load testing practices and tools to ensure that Web application performance
keeps pace with end-user demand. Moreover, by using automated load testing tools, busi-
nesses can quickly and cost-effectively assess the performance of applications before they go
live, as well as analyze their performance after deployment. As a result, businesses can confi-
dently stay one step ahead of performance issues and focus on initiatives to drive Web traffic
and revenues.
Mercury Interactive’s LoadRunner is the leading tool for predicting scalability, reliability and
performance issues of an e-business application; identifying system bottlenecks; and displaying
results. LoadRunner emulates various types of transactions using a highly scalable number of
users. This is essential for understanding an application’s limitations while planning for
growth and reducing business risk. LoadRunner also tests system behavior under real-time
conditions and converts this data into easy-to-use, yet sophisticated, graphs and reports. With
this information, businesses can more quickly and efficiently resolve problems, thereby ensur-
ing a positive end-user experience and providing the opportunity for increased revenue.
22
Load Testing White Paper
Together with our world-class partners and award-winning service and support, Mercury
Interactive provides the industry’s best Web application performance solutions capable
of supporting both traditional and wireless e-business applications.
Topaz, TurboLoad and ContentCheck are trademarks, and LoadRunner, Mercury Interactive and the Mercury Interactive logo are regis-
tered trademarks of Mercury Interactive Corporation. All other company, brand and product names are marks of their respective holders.
© 2000 Mercury Interactive Corporation. Patents pending. All rights reserved. 384-BR-LOADTEST
23