There are two editions of Visual Studio 2008 that can be used to do performance testing – Visual Studio Team System 2008 Test Edition and Visual Studio Team System 2008 Team Suite. When using these products, there are also two types of test platforms that can be used: Local without a Controller and a Test Rig. The difference being the use of the Visual Studio 2008 Team Test Load Agent/Controller to build a test rig that can utilize the processing power of multiple machines.
Things you will need
To do performance testing, you must have the following components installed:
- SQL Server – This can be SQL Server (Std or Ent) or SQL Server Express
- Visual Studio Team System 2008 (Test Edition or Team Suite)
- Servers running the web application to test (including SharePoint Servers)
To build a test rig you must also have these additional components:
- 1-n agent workstations.
- Visual Studio 2008 Team Test Load Agent installed on each agent workstation.*
- A controller workstation.
- Service accounts for both the controller and agents.
* This is a separate product and is *NOT* included with either Test Edition or Team Suite. If you are a volume license customer log into the volume license download center to obtain this product.
Install the base components
- For local test platforms or for a test rig, start by installing Visual Studio and SQL on your workstation.
- Install Visual Studio 2008 SP1.
- Create the LoadTest database:
- Open SQL Server Management Studio and connect to your local SQL server.
- In SQL Server Management Studio open the file: <Program Files>\Microsoft Visual Studio 9.0\Common7\IDE\loadtestresultsrepository.sql
- Press the Execute button on the toolbar to build/wipe the LoadTest database.
Local testing without a test rig (only when NOT using a test rig)
- Start Visual Studio and create a new Test Project.
- Under the Test menu, select Administer Test Controllers…
- Leave the Controller drop down as <Local – No controller>
- Click the button with the 3 ellipses next to the box Load Test Results Store:
- Enter the name of your SQL server instance in the Server name box.
- Make sure Use Windows Authentication is selected.
- Choose the LoadTest database in the Select or enter a database name drop-down.
- Use the Test Connection button to verify that you can connect to the database.
- Click OK.
- Click Close.
- Configure your web and load tests.
Test Rig additional installations (only when using a test rig)
- On the same computer in which you installed Visual Studio and SQL server install the controller.
- Start the Load Test Agent installation.
- When prompted, choose Install Team Test Load Agent Controller.
- Accept the EULA.
- When prompted, enter the credentials of the service account that will be used for the controller.
- Install Visual Studio 2008 SP1.
- On each agent workstation install the agent software.
- Start the Load Test Agent installation.
- When prompted, choose Install Team Test Load Agent.
- Accept the EULA.
- When prompted, enter the credentials of the service account that will be used for the agent.
- When prompted, enter the name of the machine that is hosting the Team Test Load Agent Controller.
- Restart the machine when prompted.
- Install Visual Studio SP1.
- Start Visual Studio and create a new Test Project.
- Under the Test menu, select Administer Test controllers…
- In the Controller box, either select or type the name of the machine that you installed the Team Test Load Agent Controller onto.
- Click Close.
- On the Test menu, select a run configuration from the Edit Test Run Configurations submenu.
- Select the Controller and Agent category on the left.
- Choose the Remote option.
- In the drop down, select the name of the controller you want to use.
- Configure your web and load tests.
Additional/Recommended additional configuration
When using a multi-core agent workstation, configure the agent to use Server Garbage Collection:
- Open in Notepad the file: <Program Files>\Microsoft Visual Studio 9.0 Team Test Load Agent\LoadTest\QTAgent.exe.config
- In the XML document, locate the /configuration/runtime tag.
- Create a new child tag of: <gcServer enabled=”true”/>
User accounts and security groups
- Use only domain accounts.
- On agent computers, add the controller service account to either the Performance Log Users or Administrators local security group.
- On servers testing, add the controller service account to the Performance Log Users local security group.
Problems retrieving performance counters from servers
- See my other blog entry at: https://www.catapultsystems.com/tlingenfelder/archive/2009/06/18/performance-counters-timeouts-and-load-testing-with-visual-studio-2008.aspx