One year ago I started to investigate how we could use Load Test feature that is available on Visual Studio 2013 Ultimate and Microsoft Azure on our own project. The main idea was to develop a mechanism to test complex scenarios (especially written in C#) that can simulate 10k, 20k and even 100k users.
The idea was accepted by client and we end up with a great and interesting application that can block a system witch worth millions. This is great from both sides. Mission complete for the team that defined the load tests, because they were able to define the load tests. But in the same time great for the development team and especially for the support team because they know the limits of the system.
Now, we stuck with another problem. Because we are using Microsoft Azure infrastructure to run Load Tests (having our own hardware would be to expensive), we cannot simulate calls from multiple IP address.
This is a current limitation Visual Studio Online - IP Switching feature is not yet available. What does this mean? Basically you cannot run/configure a Load Test from Visual Studio Online to use multiple IPs during load test.
At the beginning, this feature was not very important for us, but now we realize that we would like to have this ability.
What we could do?
Based on the feedback that we received, we have a pretty good option. We can configure Test Controllers and Test Agents for this purpose. We’ll need to create VMs on Microsoft Azure that will play the role of Test Agents. This machine will be uses to run the load tests. Because each machine has a different IP, it will be pretty simple to distribute the tests on this machines.
Next, I would like to go more dipper and discuss a little about this solution.
Let’s define two terms that appeared in the above paragraph. A Test Controller is the one that orchestrate all the load test. Is the one that send the tests to each node and wait the tests to run, collect the result and so on. A Test Agent is the node where the load tests are run. Test Agents represents the nodes that are used to run the tests.
The relationship between Test Controller and Test Agents is 1 to N. This means that we can have in a configuration one Test Controller that orchestrate the load tests, but we can have multiple Test Agents that will be used to run the tests.
It is important to know that one license of Visual Studio 2013 Ultimate it is enough for all this. You don’t need a different license for each Test Agent.
We can have different configurations. For example we can use only one machine that can play the role of Test Controller and Test Agent. Another option is to have Test Controller and Test Agents installed on different machines and Visual Studio installed only on the machine that is used by testers/developers to trigger the load test.
If you try to do something like this on Microsoft Azure don’t forget to open the port number 6901. This is the default port number uses by nodes for incoming calls. Don’t forget that all communication between the machine where Visual Studio is installed (machine from where the load test is triggered) and Test Agents is made through Test Controller.
Based on this information we should create VMs on Microsoft Azure that play the role of Test Controller and Test Agents. You can create and configure only one time and reuse them each time when you need it.
Useful links:
The idea was accepted by client and we end up with a great and interesting application that can block a system witch worth millions. This is great from both sides. Mission complete for the team that defined the load tests, because they were able to define the load tests. But in the same time great for the development team and especially for the support team because they know the limits of the system.
Now, we stuck with another problem. Because we are using Microsoft Azure infrastructure to run Load Tests (having our own hardware would be to expensive), we cannot simulate calls from multiple IP address.
This is a current limitation Visual Studio Online - IP Switching feature is not yet available. What does this mean? Basically you cannot run/configure a Load Test from Visual Studio Online to use multiple IPs during load test.
At the beginning, this feature was not very important for us, but now we realize that we would like to have this ability.
What we could do?
Based on the feedback that we received, we have a pretty good option. We can configure Test Controllers and Test Agents for this purpose. We’ll need to create VMs on Microsoft Azure that will play the role of Test Agents. This machine will be uses to run the load tests. Because each machine has a different IP, it will be pretty simple to distribute the tests on this machines.
Next, I would like to go more dipper and discuss a little about this solution.
Let’s define two terms that appeared in the above paragraph. A Test Controller is the one that orchestrate all the load test. Is the one that send the tests to each node and wait the tests to run, collect the result and so on. A Test Agent is the node where the load tests are run. Test Agents represents the nodes that are used to run the tests.
The relationship between Test Controller and Test Agents is 1 to N. This means that we can have in a configuration one Test Controller that orchestrate the load tests, but we can have multiple Test Agents that will be used to run the tests.
It is important to know that one license of Visual Studio 2013 Ultimate it is enough for all this. You don’t need a different license for each Test Agent.
We can have different configurations. For example we can use only one machine that can play the role of Test Controller and Test Agent. Another option is to have Test Controller and Test Agents installed on different machines and Visual Studio installed only on the machine that is used by testers/developers to trigger the load test.
If you try to do something like this on Microsoft Azure don’t forget to open the port number 6901. This is the default port number uses by nodes for incoming calls. Don’t forget that all communication between the machine where Visual Studio is installed (machine from where the load test is triggered) and Test Agents is made through Test Controller.
Based on this information we should create VMs on Microsoft Azure that play the role of Test Controller and Test Agents. You can create and configure only one time and reuse them each time when you need it.
Useful links:
- Base Load Testing description for this scenario: http://msdn.microsoft.com/en-us/library/ms243155.aspx
- How to install and configure it: http://msdn.microsoft.com/en-us/library/dd648127.aspx
- Setting up: http://msdn.microsoft.com/en-us/library/hh546459.aspx
Hello!
ReplyDeleteWhat if you want to run more than 10K virtual users with IP Spoofing? How many Azure VMs should I create?
Regards!