AutomatedQA: Award-winning tools for software testing and quality assurance

Home » Products » TestComplete » TestComplete - Load, Stress and Scalability Testing Support

TestComplete - Load, Stress and Scalability Testing Support

About Load, Stress and Scalability Testing

Load, stress and scalability testing is an essential part of the entire development and testing process of web servers.

Load testing consists of simulating real-life workload conditions for the application under test. It helps you determine various characteristics of the application working under massive workload. You can perform your test several times with a different number of users working concurrently to find out how various parts of the application react to the increasing load.
Stress testing is aimed at determining the load (for example, the number of user requests) that causes a crash or an unacceptable performance of the application under test.
The purpose of scalability testing is to determine whether your application scales for the workload growth. Suppose your company expects a six-fold load increase on your server in the next two months. You may need to increase the server performance to shorten the request processing time to better serve visitors. If your application is scalable, you can shorten this time by upgrading the server hardware, for example, you can increase the CPU frequency and add more RAM. Also, you can increase the request performance by changing the server software, for example, by replacing the text-file data storages with SQL Server databases. To find a better solution, first you can test hardware changes, then software changes and after that compare the results of the tests.

If the scalability tests report that the application is not scalable, this means there is a bottleneck somewhere within the application. To find it quickly, you can analyze your server application with special utilities, such as AQtime.

Scalability testing can be performed as a series of load tests with different hardware or software configurations keeping other settings of the testing environment unchanged. When performing scalability testing, you can vary such variables as the CPU frequency, number and type of servers, amount of available RAM, and so on.

To achieve the goals of load, stress and scalability testing, you need to simulate a massive load in the web application under test. You can do this by using a special testing tool, like TestComplete, that can simulate the workload of thousands of users. To emulate real-life conditions, TestComplete supports concurrent simulation of user requests on several computers in your network. Using TestComplete, you can easily find answers to the following questions:

How does the server's response time change if you increase or decrease the number of users?
How many users can simultaneously work with the web server without a perceptible slowdown?
What load can crash the server application?
How do hardware and software changes affect the server performance?
And more!

Load, Stress and Scalability Testing With TestComplete

TestComplete can record requests that are sent from the client computer(s) to a web server via the HTTP, HTTPS or SOAP protocols and use the recorded traffic to simulate user actions over the server. TestComplete records requests sent to any web server, regardless of which Internet browser you are using (Internet Explorer, Netscape Navigator, Mozilla or Opera), web server type (Internet Information Services, Apache, and so on) and platform (Windows, Linux, and so on).

TestComplete uses recorded requests to simulate a sequence of user actions. Each sequence is played back via a virtual user. The user is called virtual, because “he” does not really exist. Only his actions (the recorded HTTP requests) exist. TestComplete simulates requests and the server “thinks” that it’s working with an actual user.

To simulate virtual users, you create load tests in TestComplete. A test may include several dozens of virtual users that work simultaneously (the number of available virtual users is determined by your TestComplete license). The start of simulation coincides with the start of the load test. When you command a test to run, TestComplete runs all virtual users that belong to this test. The sequence of actions to be simulated (called a task) does not depend on the test. That is, users that belong to the same test can have different tasks. The task a user will perform is specified when you create a load test.

You can create tests both visually or programmatically. Visually created tests can be executed as test items or they can be executed from scripts. TestComplete provides special program objects to execute tests created visually and to create load tests entirely from a script. Both approaches let you create the desired number of virtual users, assign tasks to them, specify the start delay and the Internet browser to be simulated, and so on. The result is like getting a bunch of human testers together to hammer your web server. TestComplete tracks all the actions taken by your host of virtual users as well as the server responses and creates in-depth reports about the results.

To simulate real-world conditions, you can simulate virtual users on other network computers. To do this, you can install TestComplete, TestExecute or the HTTP Load Testing Remote Agent on these computers. The Remote Agent is part of TestComplete Enterprise versions that includes 250 or more virtual users. The Remote Agent allows you to create virtual users on computers which TestComplete is not installed. TestComplete installed on the testing machine will detect the Remote Agent running on other network computers and will allow you to manage virtual users and their groups there.

Besides workstation and task, you can also specify the web browser type for each user. Currently, TestComplete can emulate the following browsers:

Internet Explorer 5, 6 and 7
Netscape Navigator 6.0
Opera 8.0
FireFox 1.0.1
FireFox 1.5
Pocket IE
Smartphone

Let's see how you can perform load, stress and scalability testing of web servers with TestComplete.

Recording HTTP Traffic

In order to record, modify and play back the recorded traffic in your TestComplete project, you should add the HTTP Load Testing project item to it. This project item holds all the information needed to modify and play back the requests. For instance, it provides special editors enabling you to modify the recorded requests and responses and to create load tests visually.

To start HTTP recording, select Script | Record from TestComplete’s menu (TestComplete always starts recording by recording a script) and then choose  HTTP Record on the ensuing Recording toolbar. Upon doing this, you will be able to work with the tested web server via your Internet browser as you normally would. TestComplete will record all incoming and outgoing traffic and store it as a self-contained module (task). To stop recording the task, click  HTTP Record again.

You can record several tasks during a single recording session. All recorded tasks are shown in the Project Explorer panel as child nodes of the LoadTesting | Tasks node:

To view the task contents, right-click the desired task in the Project Explorer and choose Edit form the context menu. TestComplete will show the Task editor:

As you can see, each task includes one or more connections, which, in their turn, hold requests sent by the client to the server and server responses. On the right of the Tasks section, TestComplete shows detailed information on the request and response. Using the editor you can view and modify the recorded traffic and responses.

Besides recording HTTP traffic, TestComplete also generates a script that simulates the recorded user actions using one virtual user:

Simulating User Actions

To simulate virtual user actions, you need to create a load test. The easiest way to create a load test is to use the special editor:


In the editor you can —

Easily create the desired number of virtual users, however, the number of virtual users per workstation cannot exceed 300. This restriction is caused by certain operating system limitations. If you need to simulate more users, use more workstations. For example, to simulate 600 users, you can use two workstations.
Specify the tasks these users will execute.
Specify the Internet browsers the users will work with.
Specify the workstation where the users will be simulated.
Set the start delay for the users. The start delay lets you emulate a growing load on the server. For instance, the test can start with 10 virtual users, 5 other users can join them one minute after the test start, 5 more users can join two minutes later, etc.

Note that TestComplete also supports a scripting approach for creating virtual users. It includes special program objects and methods that let you perform all of the above mentioned tasks.

TestComplete also includes special objects and events that let you modify the simulated traffic during the test run.
To start the simulation, you can run your test or script. You can also run visually created tests from your scripts.

Recording and Simulating HTTPS Traffic

The HTTPS protocol (HTTPS = HTTP + Security) is used to secure data sent from one computer to another via the Internet. With TestComplete you can simulate HTTPS traffic. TestComplete can only record traffic for non-secure connections. It includes a special feature that lets you “translate” traffic of non-secure connections to the secure form during playback. That is, to simulate HTTPS traffic, you should record HTTP traffic using non-secure connections and then modify properties of secure connections so that TestComplete plays back their requests in the secure mode. TestComplete's help system includes more information about this.

Analysis of Test Results

TestComplete stores results of each load test run to the test log in two places. Detailed results of the run are stored along with other tests (scripts, low-level procedures, and so on) executed during the run. Brief results are stored to the Project Analysis | Load Testing Analysis node.

Load Testing Log Page

To review results stored to the test log along with other test results, simply double-click the Load testing results node in the test log page. TestComplete will show a panel holding the load testing results:

This panel holds the following child panels: Users, Connections, Requests and Headers.

The Users section displays information about simulated virtual users: user name, task name, the time of the task execution, and so forth.
The Connections section displays information for each connection created by the task during the run: duration of the connection, the number of requests the user made during the connection, the total number of bytes sent by all requests, and so on. The chart on the left of the Connections section graphically represents test results.
The lower section, Requests, contains information about requests that were made by the connection selected in the Connections section. The chart on the left of the panel displays the results graphically. For instance, it lets you easily find the slowest and fastest requests.
The Headers section shows the header of the request and server response.

Like with any other test results, you can create a working item in the issue-tracking system you use. To do this, right-click the load testing results node in the test tree and choose Create Issue from the context menu:

Load Testing Analysis Page

Besides the Load Testing Log page that displays results of one test run, TestComplete also provides the Load Testing Analysis pages that hold summary results stored for each test run.

Using the analysis page you can compare results of several test runs, find crash points, check the site scalability and determine the dependency of different web server characteristics on workloads. For instance, this page allows you to find the number of users working simultaneously that cause performance slowdowns. The drastic performance recession may signal that the server cannot cope with the load. From the graphs you can easily see whether your application performance scales proportionally to the workload growth.

 
For more information on TestComplete and other Quality Assurance products from AutomatedQA, write to us at sales@automatedqa.com.

 
Copyright © 1999-2008, AutomatedQA, Corp. All Rights Reserved.
Home | Legal | About | Contact | Site Map | Print