Load Test: An Overview

Part I - VSTT Load Test

= Concepts =

Terms Compared with xUnit (xUnit/VSTT):
- Test Suite/Test Class
- Test Case/Test Method
- Test Runner/Test Runner
- Test Fixture Setup/Test Init
- Test Fixture Teardown/Test Cleanup
- Suite Fixture Setup/Class Init
- Suite Fixture Teardown/Class Cleanup

The load simulation architecture consists of a Client, Controller, and Agents:
  • The Client is used to develop tests, select tests to run, and view test results.
  • The Controller is used to administer the agents and collect test results.
  • The Agents are used to run the tests.
  • The controller and agents are collectively called a Rig.
When conducting load test, each Unit Test/Web Test is independent of other tests and of the computer on which it is run.

When you create a load test, Visual Studio Team System Test Edition lets you specify a Counter Set. A counter set is a set of performance counters that are useful to monitor during a load test run.

During a load test run, the performance counter data is collected and stored in the Load Test Results Repository, , which is a SQL database. The Load Test Results Repository contains performance counter data and any information about recorded errors.

= Practices =

1. Compose Test Cases

- 1.1 Install VSTT + Team Explorer(the Later one is required for Web/Load Test)
- 1.2 Write Web/Unit Test
- 1.3 Compose Load Test
The most complicated thing may be specifying load pattern.

2. Setting Up Test RIG

- 2.1 Install Load Test Controller [LoadAgent]
- 2.2 Install Load Test Agent
- 2.3 Admin Test RIG
== Click Visual Studio Menu: Test -> Administer Test Controller, you can now Add / Remove / Config test agents in the dialog box.

3. Run Test

- 3.1 Config Test [Specify Test Run Configuration, Setup Load Test on Rig]
- 3.2 Run Load Test [Conduct Test Using Mstest.exe]

4. Analysis Result

- 4.1 View a Test Run on a Rig: http://msdn.microsoft.com/en-us/library/ms243178.aspx
- 4.2 Monitoring and Analyzing a Load Test Result: http://msdn.microsoft.com/en-us/library/aa730850(VS.80).aspx

[VSTT Load Agent - http://msdn.microsoft.com/en-us/teamsystem/aa718815.aspx]
[Controller/Agent/Rig - http://msdn.microsoft.com/en-us/library/ms182634.aspx]

1. Report Visual Studio Team System Load Test Results Via A Configurable Web Site - http://msdn.microsoft.com/en-us/magazine/cc163592.aspx
2. Considerations for Large Load Tests - http://msdn.microsoft.com/en-us/library/ms404664.aspx
3. Real-World Load Testing Tips to Avoid Bottlenecks When Your Web App Goes Live - http://msdn.microsoft.com/en-us/magazine/cc188783.aspx

Part II - LoadRunner

LoadRunner Architecture:

LoadRunner contains the following components:
- The Virtual User Generator captures end-user business processes and creates
an automated performance testing script, also known as a virtual user script.
- The Controller organizes, drives, manages, and monitors the load test.
- The Load Generators create the load by running virtual users.
- The Analysis helps you view, dissect, and compare the performance results.
- The Launcher provides a single point of access for all of the LoadRunner

The Controller controls load test runs based on "Scenarios" invoking compiled "Scripts" and associated "Run-time Settings". Scripts are crafted using Mercury's "Virtual User script Generator" (named "V U Gen"), It generates C-language script code to be executed by virtual users by capturing network traffic between Internet application clients and servers.

At the end of each run, the Controller combines its monitoring logs with logs obtained from load generators, and makes them available to the "Analysis" program, which can then create run result reports and graphs for Microsoft Word, Crystal Reports, or an HTML webpage browser.

III Other Tools

1. Web Application Stress Tool
2. Apache Benchmark


1. http://en.wikipedia.org/wiki/Stress_testing_(software)
2. http://en.wikipedia.org/wiki/Portal:Software_Testing
3. http://en.wikipedia.org/wiki/Category:Load_testing_tools
4. http://en.wikipedia.org/wiki/Load_testing

No comments: