'When running unit tests in ReSharper, how can I see the overall execution time?

I'd like to know how long all my tests took to run? Is that possible?



Solution 1:[1]

Yes. Select Options(is in the Unit Test Sessions pane)->Show Time and then select Options->Group by Project Structure in unit test window.

Solution 2:[2]

If all your tests in your test session are in one assembly and if you use MSTest framework you could use methods marked with [AssemblyInitialize()] and [AssemblyCleanup()] for measuring time duration.

See example in MSDN Library for using these attributes.

Solution 3:[3]

For people looking for the wall clock time of how much time a test execution took (it may be different to the time shown on the root node in the unit test session), here is how you can see it:

  1. Open the unit test session window
  2. Click the gear (?) icon on the top icon bar
  3. Select Diagnostics ? Show Last Launch Log
  4. There you can see from the logs: search the RunTestsStage string for start and finish entries.

In my case, the test session window showed 1 min 34 sec, but in reality they only took around 23 seconds (because of running tests in parallel).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2
Solution 3 Károly Ozsvárt