Skip to main content

Running Load Tests on Microsoft Azure with IP Switching feature

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:

Comments

Popular posts from this blog

How to check in AngularJS if a service was register or not

There are cases when you need to check in a service or a controller was register in AngularJS.
For example a valid use case is when you have the same implementation running on multiple application. In this case, you may want to intercept the HTTP provider and add a custom step there. This step don’t needs to run on all the application, only in the one where the service exist and register.
A solution for this case would be to have a flag in the configuration that specify this. In the core you would have an IF that would check the value of this flag.
Another solution is to check if a specific service was register in AngularJS or not. If the service was register that you would execute your own logic.
To check if a service was register or not in AngularJS container you need to call the ‘has’ method of ‘inhector’. It will return TRUE if the service was register.
if ($injector.has('httpInterceptorService')) { $httpProvider.interceptors.push('httpInterceptorService&#…

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine:
threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration:

TeamCity.NET 4.51EF 6.0.2VS2013
It seems that there …

[Post-Event] Codecamp Conference Cluj-Napoca - Nov 19, 2016

Last day I was invited to another Codecamp Conference, that took place in Cluj-Napoca. Like other Codecamp Conferences, the event was very big, with more than 1.000 participants and 70 sessions. There were 10 tracks in parallel, so it was pretty hard to decide at  what session you want to join.
It was great to join this conference and I hope that you discovered something new during the conference.
At this event I talked about Azure IoT Hub and how we can use it to connect devices from the field. I had a lot of demos using Raspberry PI 3 and Simplelink SensorTag. Most of the samples were written in C++ and Node.JS and people were impressed that even if we are using Microsoft technologies, we are not limited to C# and .NET. World and Microsoft are changing so fast. Just looking and Azure IoT Hub and new features that were launched and I'm pressed (Jobs, Methods, Device Twin).
On backend my demos covered Stream Analytics, Event Hub, Azure Object Storage and DocumentDB.

Title:
What abo…