https://blogs.msdn.microsoft.com/testingspot/2017/02/23/guide-to-get-started-with-visual-studio-web-load-testing-and-automation/
Software Requirements. Versions and licenses
Visual Studio
The first thing you will need is Visual Studio. The Web Load & Performance Testing features of Visual studio are only available on versions: Visual Studio Enterprise 2015 or Visual Studio Ultimate 2013.
Other type of tests such as Coded UI, Manual tests and Unit testing are also available on Visual Studio Test Professional 2015however these are all functional tests. We’ll focus on performance web tests for now, this is NOT available on VS Test Professional. You can find a feature comparison among VS versions here: Compare Visual Studio 2015 Offerings.
Virtual User Licenses
On premises. No virtual user licenses are needed. You can execute load tests with any number of virtual users (as far as your hardware resources allow you) as long as you have any of the following:
– Visual Studio Enterprise 2015 with MSDN
– Visual Studio Enterprise 2015 annual and monthly subscribers (check Visual Studio 2015 Licensing White Paper)
* In Visual Studio Enterprise (or Ultimate) trial version, the virtual user count is limited to 250.
Cloud-Based testing. No extra software installation needed. You do need:
– That gets you 20,000 virtual user minutes every month to load test at no extra charge (check how virtual users minutes work and test duration limitations here: VSO Virtual users minutes).
Controller and Agents Software
On premises. If you are planning to load test an application in an on-premises environment, you will need a Controller and at least 1 agent machine (check next section for hardware requirements). You can find the installable software for these two components based on your Visual studio version here:
– Download Agents for Microsoft Visual Studio 2013 Update 5. This is the correct version of the Agents and Controllers software for load testing. Don’t use the Test Agents for VS 2015 for load testing. It is meant for continuous tests on build scenarios, it doesn’t have a test controller or a configuration tool.
Cloud-Based Load testing. No additional software installation needed.
2. Infrastructure/Hardware requirements
Visual Studio (IDE) System Requirements
Visual Studio is used to record webtests, kick off Load Tests and visualize results. It is not recommended to install it on the Controller machine or Test Agents. The system requirements for the machine to host either Visual Studio Enterprise 2015 or Visual Studio Ultimate 2013 are:
- Windows 7 SP1 or above, or
- Windows Server 2008 R2 SP1 or above.
- A minimum of 1.6GHz, 1.0 GB of RAM (1.5 if working on a VM).
- 10 GB of available HD space (20 GB for VS 2013).
- Check details here:
Controller and Agents Hardware Requirements
On premises. If you are planning a load test project in a on premises environment, you will need a controller and at least 1 test agent, to set this up you will need the following:
- OS/Framework requirements
- Controller: Windows 7 SP1 / 8 / 8.1 or Windows Server 2008 R2 SP1 / 2012 / 2012 R2
- Test Agents: Windows XP SP3 / 7 SP1 / 8 / 8.1 or Windows Server 2008 R2 SP1 / 2012 / 2012 R2.
- Both: .NET Framework 4.5
- More information here: System requirements for Controller and Agents
You can also execute local test runs (without controller or test agents) directly from your Visual Studio host, this is done normally for debugging purposes since you are limited by resources.
- Hardware sizing
The table below shows the recommended hardware requirements. You can use this table to plan how many test agents and what size of controller suit your load testing needs:
Configuration
|
Component
|
CPU
|
HD
|
Memory (RAM)
|
< 500 virtual users
|
Test agent
|
2.6 GHz
|
10 GB
|
2 GB
|
< 1000 virtual users
|
Test agent
|
Dual processor 2.6 GHz
|
10 GB
|
2 GB
|
N x 1000 virtual users
|
Test agent
|
Scale out to N agents each with Dual 2.6 Ghz
|
10 GB
|
2 GB
|
< 30 computers in the test environment. This includes agents and servers under test.
|
Test Controller
|
2.6 GHz
|
Read load test repository section
| |
N x 30 computers in the test environment. This includes agents and servers under test.
|
Test Controller
|
N 2.6 GHz processors
|
Read load test repository section
|
Tips:
- A rule of thumb that I use is that a Test Agent in a VM can hold from 500 to 1000 webtest virtual users on a typical load test. If you have many extraction plugins or external dependencies(CSV files, database connections) that number will decrease since it takes more processing to do that.
- Test Agents save the load test results in a temp folder before sending everything to the Controller. You may want to monitor the free space in the HD and periodically clean the temporary folders. It's usually in this path: \\
\c$\Users\ \AppData\Local\VSEQT\QTAgent\ \AGENT01\ - Keep in mind other Server resources aside from CPU and RAM Memory. It's always a good practice to add the Test Agents to your Scenario for monitoring.
- In one of my test engagements I assumed that 3 BIG Test Agent VMs would be equivalent to 9 SMALL Test Agent VMs because the specs CPU and RAM specs matched up. However during the load test I found that this caused a bottleneck on the Test Agents because my virtual users were in queue waiting for the Agents to free threads.
- Load Test Repository
Load tests results may be stored in the Load Test Results Repository, which is a SQL database. The Results Repository database is created by setup for controllers (or created automatically on the first local run of a load test), a the database will be created automatically if the load test schema is not present.
SQL Server 2012 Express LocalDB, which is installed with Visual Studio is the default database server for load tests. If SQL Server Express is detected with an existing load test database, Visual Studio Enterprise will try to connect to it and use it.
However, for heavier database needs you should consider upgrading to a full SQL Server to provide further scaling potential. Also, SQL Express is limited to using a maximum of 4 GB of disk space. If you will run many load tests over a long period of time, you should consider configuring the load test results store to use an instance of the full SQL Server product if available. More on Load Test results repository.
Tip: In my experience, a typical single 1 hour load test can take from 100MB to 500MB of storage depending on the number of webtests, performance counters, VMs you are monitoring, etc. Plan storage needs accordingly and take in consideration that this information is temporarily stored in the Test Agents. When the test ends the results are collected in the Controller's RAM memory before finally being placed in the SQL Repository, so also plan RAM Memory needs accordingly.
- Alternative: Testing using VSO or TFS instead of Controller
For test scenarios (still on premises) using Visual Studio Online (VSO) or Team Foundation Server (TFS) 2015, you won’t need a test controller because Agents for Microsoft Visual Studio 2015 handle orchestration by communicating with VSO or TFS 2015. For example, you’re running automated tests with your build and release workflows in VSO or TFS 2015.
Cloud-Based Load testing
You can use cloud-based load testing to avoid having to use your own resources and machines. In this case you don’t need a Controller or Test Agents. The cloud-service provides virtual machines in the cloud that generate the load needed to test your target application/website.
All you need is a Visual Studio Online (VSO) account. Check ‘Getting started with Load Tests’ further down in this document.