Creating Your First VSTS Load Test

Home / ALM / Performance Testing / Creating Your First VSTS Load Test

A few weeks ago I gave a talk on Performance Testing with VSTS. Since I received so many questions during the talk, I thought I’d put together a series of blog posts on the subject. I hope to address some of the questions that were asked and will hopefully even answer a few that weren’t asked!

At this time, I’m thinking the series of posts will include something along these lines:

  • Creating Your First VSTS Load Test (this post)
  • Setup Your VSTS Load Tests Even Faster!
  • Installing the Cloud Load Test Agent On-Premises (video)
  • Running VSTS Load Tests On-Premises
  • Creating VSTS Load Tests from an HTTP Archive
  • Creating Load Tests with Visual Studio
  • VSTS Load Test Pricing and Other Information

While this seems like a good place to start, I reserve the right to change the list of topics as I progress. Smile I am also hoping to put together a few videos along the way as well so we’ll see how that goes.

With that said, let’s get started…

Load Testing in Less Than 60 Seconds!

Seriously! I just timed it and it took me 50.51 seconds from the point where I started to type in my VSTS account URL to the point where I had saved my first load test! Granted, it was a very simple load test but I was still able to set it up and get it ready to run in under one minute.

Part of the secret is that I was able to do everything from within my web browser on my VSTS account. I did not need to fire up Visual Studio or any other tools – just a browser.

Here are the exact steps I went through during that 50 seconds:

  1. Navigate to my VSTS account – https://moonspace.visualstudio.com
  2. Click on the Load Test top-level menu item
    image
  3. Click on New->URL Based Test
    image
  4. Give the load test a name (e.g. “Timed Test Run”)
  5. Enter a (public) URL to load test – e.g. http://www.domain.com/someurl
    image
  6. Click on Save
  7. Click on Run Test

When the load test has completed you will see results similar to this:

image

Can More than One URL be Tested?

That’s a great question! Yes, you can setup one or more URLs to be tested. Each URL can also have its own set of headers and query string parameters as well. You do this by clicking on the various “Add…” links as shown below:

image 

While this gives you the ability to load test multiple URLs (in sequence) it can be a bit tedious to enter more than a few URLs along with the corresponding header and query string values. In the next post, Setup Your VSTS Load Tests Even Faster!, we will look at alternatives to manually entering multiple URLs, headers and query strings. Yes, there’s an easier way!

That’s Cool! What Else Can be Customized?

Another great question! We’ve covered how to setup the URLs to be tested above. Now let’s take a look at how the load test can be configured to run.

While in edit mode, click on the Settings link to view the load test settings. By default, they will look something like this:

image

Most of these settings are somewhat self-explanatory. For example, Run duration (minutes) is exactly that – the number of minutes you want the load test to run. Max v-users is the maximum number of virtual users to use when executing this test. And, so on…

A couple of settings to pay special attention to is Load pattern and Geo-location. The former will allow you to choose between a constant load test pattern or a step load test pattern. Selecting the step pattern will present different settings for you to configured.

The latter setting (Geo-location) allows you to specify the Azure region in which you wish the tests to run.

Where Can I Find Out More?

If you want to read the nitty-gritty details about URL-based load testing, check out Run URL-based Load Tests with Visual Studio Team Services. Also, as the rest of the posts in this series become available, I’ll link to them here.

In the meantime, if you have any questions, please let me know below and I’ll do my best to answer them (or find someone who can!).

Happy testing!

ContactUs.com