ReSharper runs unit tests in the Unit Test Sessions window. The window appears automatically when you run tests from the code editor or from Solution Explorer. You can also open the window by selecting ReSharper | Windows | Unit Test Sessions, or pressing Ctrl+Alt+R.
The Unit Test Sessions window is designed to help you run any number of unit test sessions, independently of each other, as well as simultaneously.
Sessions can be composed of any combination of tests. In the debugging mode, only one session can be run at a time.
The unit test tree shows the structure of tests belonging to a session, which you can filter to show only passed, failed or ignored unit tests. You can navigate to the code of any unit test by double-clicking it.
The progress bar and the status bar display the current progress. You can stop, run or re-build and re-run unit tests at any time.
The Output pane lets you analyze test results and navigate from a failed test's output to the code lines that originated the exception, all with a single click.
Toolbar
| Control | Name | Description |
|
|
Repeat Previous Run |
Repeats the previous test run. |
|
|
Run All Tests |
Runs all tests in the current session. |
|
|
Run Selected Tests |
Runs selected tests in the current session. |
|
|
Debug Selected Tests |
Debugs selected tests in the current session. |
|
|
Cover Selected Tests |
Runs code coverage on the selected tests using JetBrains dotCover. |
|
|
Profile Selected Tests |
Profiles selected tests using JetBrains dotTrace. |
|
|
Stop Execution |
Stops the current test session. |
|
|
Show All Tests |
Shows successful, failed, and ignored tests in the tree view. |
|
|
Show Only Failed Tests |
Hides anything but failed tests from the tree view. |
|
|
Show Only Ignored Tests |
Hides anything but ignored tests from the tree view. |
|
|
Filter Tests |
Allows choosing any combination of test results (successful, failed, or ignored) to display. |
|
|
Build Settings |
Specifies whether building is required before running tests. Provides three options:
|
|
|
Track Running Test |
Specifies whether ReSharper should select test entries when the corresponding tests are executed. |
|
|
Remove Selected Tests |
Removes selected tests from the current session. |
|
|
Lock Session |
Locks the current test session to prevent extending it with new tests. |
|
|
Show Time |
Specifies whether to show test run duration in the status bar of the Unit Test Sessions window, just below the progress bar. |
|
|
Expand All |
Expands all list nodes. |
|
|
Collapse All |
Collapses all list nodes. |
|
|
Previous |
Selects the previous list node. |
|
|
Next |
Selects the next list node. |
|
|
Show Output |
Specifies whether the preview pane should be displayed, and offers two alternative positions: below or to the left of the tree view. |
|
|
Export |
Lets you export the list of tests from the current session to a text file or copy it to the clipboard. |
|
Group by |
Groups tests using five alternative sets of criteria:
|
