Azure: Performance testing using the power of cloud
Issue:
This is a common question being asked in many teams: We don’t have a performance testing infrastructure. How do I do performance/load/stress testing?
Solution:
With the power of Azure and Visual Studio, a cost-effective performance testing environment can be setup in no time.
The approach is to set up the Visual Studio load test agents in the cloud and scale them based on the needs.
Advantages:
- Generate load from around the globe (US, Europe, Asia).
- Lower infrastructure cost. Spawn load test agents only when needed and remove them when not required.
- Higher turnaround time. Spawn any number of load test agents in a few minutes.
- Thousands of concurrent requests can be generated using the Visual Studio Virtual User license Pack.
More Advantages specific to cloud projects:
- The network latency can be minimized if the load test agents are in the same datacenter as the application under test.
- Transfer costs for the performance testing data can be saved if the load test agents are in the same datacenter as the application under test.
Disadvantage:
The application under test needs to be deployed on an internet-facing environment. You cannot run tests on deployment on the local development environment.
Load Test Agents in Cloud:
Steps to configure a load test rig with multiple agents in the cloud:
- Install Visual Studio Test Controller on a local box http://msdn.microsoft.com/en-us/library/dd648127.aspx#testcontrollers and configure it for load testing
- Create a hosted service http://msdn.microsoft.com/en-us/library/windowsazure/gg432967.aspx
- Set up Windows Azure Connect http://msdn.microsoft.com/en-us/library/windowsazure/gg508836.aspx
- Create a Local Endpoint Group for Windows Azure Connect http://technet.microsoft.com/en-us/library/hh314622(WS.10).aspx
- Download Windows Azure Tools for Visual Studio http://www.microsoft.com/download/en/details.aspx?id=15658
- Download the test agent project which contains a worker role https://skydrive.live.com/redir.aspx?cid=6e7347d6ac73603f&resid=6E7347D6AC73603F!228&parid=6E7347D6AC73603F!229&authkey=!AHKdUENEg7HigeA
- Modify all the values which are specified in “<<….>>”
- To know about remote desktop username and password encryption see http://msdn.microsoft.com/en-us/library/windowsazure/hh403987.aspx
- Make sure you have modified .zip such that it is not blank and has all the test agent setup files under "VSAgent.zip\testagent"
- Deploy the worker role on the hosted service http://msdn.microsoft.com/en-us/magazine/ee336122.aspx
- Add the worker role to the Local Endpoint Group for Windows Azure Connect
- You should be able to remote desktop to the VMs and see that the test agent is installed on them
- Configure the test agents with the test controller
- Run load tests from the test controller http://msdn.microsoft.com/en-us/library/ms184802.aspx
Reference:
This is a great article which was one my source of inspiration for setting up load test agents in cloud http://blogs.msdn.com/b/ricardo/archive/2011/04/08/load-testing-with-agents-running-on-windows-azure-part-1.aspx
The actual version of the test agent project can also be found here.