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.
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:
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. TestComplete can emulate any browser. The emulation means that TestComplete modifies the User-Agent field before simulating a request so that this field holds data indicating that a certain browser is used. To free you from managing the User-Agent strings themselves, TestComplete lets you choose one of the pre-defined browser types to emulate:
Of course, it is also possible to specify an arbitrary User-Agent string to be used in requests.
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 —
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. TestComplete can record and simulate HTTPS traffic the same way it does with HTTP traffic. When playing back the recorded HTTPS traffic, TestComplete automatically establishes a secure connection to the tested Web server so that the requests to the server are sent via HTTPS.
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.
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.

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


