MSTest is a software unit testing framework developed by Microsoft, which lets you create, manage, and run unit tests from within the Visual Studio IDE, as well as from the command line.
You can profile tests running in MSTest. Profiling your tests ensures that you're quickly alerted to any bottlenecks in your tests.
This page assumes that you're familiar with MSTest, and have already built an assembly full of tests that you want to profile.
Before you start profiling, you'll need a debug build of your test assembly.
When profiling tests, you're actually profiling MSTest.exe, with some additional setup options and arguments.
To profile tests:
%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe
/testcontainer:"C:\Documents and Settings\<USER NAME>\My Documents\Visual Studio 2012\Projects\LoginForm\MyTests\bin\Debug\MyTests.dll"
Select the required Profiling mode, Chart performance counters, Additional profiler options, and the browser to launch the application.
For more information, see Working with application settings and Setting up chart performance counters.
MSTest starts and executes all of the tests contained within the assembly.
During a profiling session you can interact with the profiler while your tests are still being profiled, and get results by selecting areas of the timeline; see Working with the timeline.
When you've finished interacting with your application, click the button in ANTS Performance Profiler to stop profiling.