To run tests from the Unit Test Explorer
Make sure that your project has been built. Otherwise, ReSharper
will not be able to populate
Unit Test Explorerwith the list of test fixtures that it contains.
ReSharper | Unit Tests | Unit Testsor ReSharper | Windows | Unit Testson the main menu. The Unit Test Explorerwindow opens.
Select tests that you want to run:
Click one of the following buttons in the
Unit Test Explorertoolbar:
Run Selected Tests
Image 2: to run selected tests in the currently active session of the
Unit Test Sessionswindow.
Append Selected Tests to Session
Image 3: to include selected tests into the session tab that is currently active in the
Unit Test Sessionswindow, without running them right away.
New Session with Selected Tests
Image 4: to create a new session in the
Unit Test Sessionswindow containing the selected tests, without running them right away.
Depending on which command you have chosen in the previous step, selected
tests display or run in the
Unit Test Sessionswindow:
To run or debug tests from the text editor or Solution Explorer
Select a project node or a solution in
Solution Explorer, or open a class in the editor.
On the ReSharper menu or context menu of the selection, choose
Unit Tests | Run Unit Testsor Unit Tests | Debug Unit Tests. The Unit Test Sessionswindow opens when you start running tests.
To run or debug an individual test using side bar marks
- In the editor, open a class that contains unit tests.
- Click a side bar mark in the gutter.
On the context menu, select
Run...or Debug...to run or debug tests that the test class contains, or Append to Sessionto include the tests into the current session in the Unit Test Sessionswindow (note that you can't add tests to a locked unit test session).
Individual test marks let you run and debug a single test independently of other tests in the same class:
A selected test or all tests in a class are run as a single
session in the
Unit Test Sessionswindow where you're able to review the test results.