ANTS Performance Profiler - 6.1

ANTS Performance Profiler

Learning ANTS Performance Profiler - 6.1

Setting up MSTest

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.

This topic assumes that you are familiar with MSTest, and have already built an assembly full of tests that you want to profile.

Setting up the performance profiler

Before you start profiling, you will need a debug build of your test assembly.

Start ANTS Performance Profiler (or use the New Profiling Session option on the File menu if ANTS Performance Profiler is already running).

fullscreenstartup3.gif

On the Performance Profiler Settings dialog box:

  1. Set the application type to profile to .NET executable.
  2. Set the .NET executable box to the path where MSTest.exe is installed. For example: C:\Programs\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe

Setting the arguments

In the Arguments box, set a /testcontainer argument to tell MSTest the path to the assembly that contains all of the tests. For example:

/testcontainer:"C:\Profiles\<USER NAME>\My Documents\Visual Studio 2008\Projects\LoginForm\MyTests\bin\Debug\MyTests.dll"

On the Performance Profiler Settings dialog select the Charting Options tab.

chartingoptions.gif

Choose the performance counters which you want to record.

Starting the profiler

Click startprofilingbutton.

MSTest starts and executes all of the tests contained within the assembly.

Getting results

During a profiling session, you can interact with the profiler while your tests are still being profiled.

To finish the tests, you can either wait for MSTest to complete and exit, or press the Stop Profiling button in ANTS Performance Profiler.

ANTS Performance Profiler shows the results of the tests. You can investigate the results in exactly the same way as with any .NET application. This allows you to spot any big bottlenecks in your tests quickly.

Was this article helpful?

Search support
Forums

ANTS Performance Profiler

all products