Profiling Unit Tests with dotTrace Performance
You can quickly profile the performance of unit tests from Visual Studio via JetBrains dotTrace Performance, a powerful and easy-to-use .NET profiling tool.
Install dotTrace Performance, and you will then be able to start profiling directly from the editor using the sidebar marks that ReSharper adds for test classes and individual tests. You can profile several tests or test classes separately: each one will be profiled in its own instance of dotTrace Performance.
To profile tests from the editor
- Select a test class declaration or an individual test to be profiled.
- Click the corresponding side bar mark in the gutter.
On the context menu, click Profile with dotTrace:
To profile tests from the Unit Test Sessions window
- Open the Unit Test Sessions window by choosing on the main menu or clicking Ctrl+Alt+R. If you haven't yet arranged a testing session, see Running and Debugging Unit Tests for guidelines.
- Select a node in the tree view of the Unit Test Sessions window, then click Profile Unit Tests with dotTrace on the toolbar.