After test execution is completed, a snapshot will be opened in the corresponding viewer. If dotTrace is set to run with administrator privileges (the Run this program as an administrator option is enabled in the application Compatibility properties) and Visual Studio is run under standard account, dotTrace will not receive the snapshot data. In such a case, either re-run Visual Studio as administrator or set dotTrace to run under standard account.

If you have several versions of dotTrace installed on your computer, the latest one is automatically selected.

To profile unit tests using standalone dotTrace:

Depending on which unit testing framework you use, specify the path to its executable file in the Application field. Your can work with the following frameworks/executables:

nunit.exe for NUnit.

nunit-console.exe for NUnit.

MSTest.exe for MSTest.

xUnit-console.exe for xUnit.

Specify the path to the .dll file with your unit tests and add arguments (if necessary) in the Arguments field.

Optionally, turn on the Advanced option to configure additional options, such as Working Directory and Profile child processes. For example, if you need to profile NUnit tests running under nunit-console.exe, note that NUnit test runner creates a separate process to run tests. Therefore you need to exclude the nunit-console.exe process from profiling. To do this:

Path to the dll file with unit tests and name of xml file where test results are stored. Example: "C:\Projects\ConsoleApplication1\ConsoleApplication1xUnit\bin\Debug\ConsoleApplication1xUnit.dll" /xml 1.xml

The resulting snapshot contains lots of information that pertains not only to the unit tests you're profiling but to test framework itself, making it a difficult task to extract information about unit tests. If you don't find unit test code in the snapshot at all, make sure the tests are actually running. In some cases MSTest stops before running tests due to inadequate permissions. If this is the case, try running dotTrace as administrator.