Cloud-Based Load Testing Using Team Foundation Service

If you have a Web application that will receive even moderate traffic, you should probably perform some load testing. Load testing can help identify what your maximum operating capacity is, as well as any bottlenecks that might prevent you from reaching that capacity. Now I’m not going to do a deep-dive into load testing, but instead I’m going to show you how to use Team Foundation Service to perform that testing in the cloud.

I’m only going to use a couple of tools here. First, I’m using Visual Studio 2013 Ultimate. If you don’t yet have it, you can download a trialĀ here. Second, I’ll be using Team Foundation Service. If you haven’t yet signed up for this, you should. There is a free offering (for up to five users) and the sign-up is quick and painless.

Since I don’t already have a project with load tests, I’m going to quickly step through creating one that we’ll use for our demo.

Next, we want to create one or more Web performance tests.

Record a Web Performance Test

  1. Create a Web performance test. After creating this test, your browser will open.
  2. Enter the URL of the site you wish to test and begin recording (must be publicly accessible on the Internet). Just use the site the way you feel your users would, and record a little bit of activity.
  3. When you are done, just stop recording. Edit any test properties that you wish to change the performance goals for.
  4. Save the test.

Create a Load Test

  1. Create a new load test in your project.
  2. Step through the load test wizard and configure your test.
  3. Select the Test Mix step and add the test(s) that you just created.

When you finish the wizard, the Web performance test is added to the load test andĀ appears in the load test editor.


Set Up Your Project to Use Team Foundation Service

If you have existing load tests that you created using Visual Studio 2010 or Visual Studio 2012, open your existing project using Visual Studio 2013 first.

  1. Edit the test settings file to point your project to Team Foundation Service.
  2. Next, connect to a Team Project. If you don’t already have one, create one now.
  3. Now we are ready to run our load test and view the results.

Run the Load Test

  1. Run the load test.
  2. Once the test has completed, you can download a report for viewing.

Conclusion

With the offering of this feature, Microsoft has made it a breeze to conduct load testing on your website. There is no need to set up your own machines to create this load, and it’s a great way to generate the load of many users hitting your site at the same time. So, go run some load tests using the service. If you run into issues or have any thoughts on this topic, please comment below.

About Darrin Brandon

Darrin Brandon is a software engineer with AIS' Raleigh, NC office. Darrin has over 15 years of software development and management experience across a wide variety of domains. He started his professional career by serving over 11 years as an Intelligence Analyst in the United States Air Force, and it was there that his passion for programming was born. While he originally "cut his teeth" on Classic ASP, he has lived on the .Net stack for more than a decade, with a primary focus on Web technologies. More recently, Darrin has taken a deep-dive into the SharePoint platform, serving as a developer on several projects for federal customers. In his spare time Darrin enjoys coaching baseball, hunting, fishing and chilling out around the fire pit with his family and friends.