A unique load testing experiment

Most of the guidance you’ll find about Visual Studio Ultimate Load Tests suggests that they are only for load testing Web Performance tests. Actually, they can be used to load other types of tests, such as unit tests. I demonstrated this at STARWEST last week. Instead of load testing the execution of a database or other service, I thought I would try something fun. I created a simple unit test that played a random tone using the beep command and then placed that under load.

using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Cool.Tests
  public class Load
    public void BeepTest()
      int frequency = new Random().Next(1000, 5000);
      Console.Beep(frequency, 50);

I then created a simple load test called Symphony.loadtest and added the BeepTest to it.
Load test running

The resulting load test was fun to listen to. Click the image below to see for yourself.
Symphony Load Test Running

Attachment: LoadTestProject.zip


Leave a Reply

Your email address will not be published. Required fields are marked *