Search code examples
visual-studio-2013automationperformance-testingload-testing

Is it possible to automate load tests created using Visual studio 2013 Test Tools?


I have created a test suite consisting of several load and webtests using Visual Studio 2013 which were recorded against our sites. These have been working well, returning metrics which have been very useful.

As part of our performance plan, we run a 12 hour load test every night on the new build to ensure that performance has not regressed.

Currently, these load tests have to be kicked off manually on the controller which is installed on an AWS box, which then generates the traffic using AWS boxes that act as agents.

It would be great if this process could be automated so that, every night at this time, our main user journey load test is kicked off.

I am relatively new to performance testing and this tool - i have researched in many places online as to how this could be doable, but I have been unable to find an answer anywhere.

The only useful answer i could come across was that in VS2012. you could run load tests via the console, which would have enabled me to write some kind of automation script, possibly using powershell, but it appears this was removed in VS2013.

Any pointers would be great as to what alternative/paths may be available. As mentioned, these are being run on AWS boxes, we dont use Microsofts Test Manager.


Solution

  • Use the Windows Task Scheduler to schedule a task that will execute mstest.exe with the appropriate arguments to run you load test. For example, your arguments might look something like this:

    /testcontainer:"C:...\LoadTest.loadtest" /testsettings:"C:...\LoadTestRig.testsettings" /resultsfile:"C:...\TestResults\User_Agent_TestResults.trx"

    You can find more information on mstest arguments here:

    https://msdn.microsoft.com/en-us/library/ms182489.aspx