Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Success: Test not run" in Test Sessions window (Resharper) in Visual Studio

I use Resharper in Visual Studio 2015 for running tests. However I'm confused with the statuses Test not run - they are there for both Success and Failed. If I run one of such tests separately, the status temporary changes to Pending: Test not run and then back to Success: Test not run. I can't find any info why the test hasn't run. Furthermore I don't understand why the status is Success (or Failed) if the test was not run - how could it know?

How should I interpret the statuses and what can I do to make it run all tests?

(Using VS 2015 Enterprise with Update 1, Resharper Ultimate 10.0.2, both up-to-date to the moment, test framework is MsTest)

enter image description here

like image 845
eXavier Avatar asked Jan 23 '16 21:01

eXavier


1 Answers

I was suffering the same "Test not run" message. I believe that it might be related to running the unit tests with coverage and then adding more unit tests and running them without coverage.

I cleared it in my environment by creating a 'new session' (right click the root unit test and select from the context menu, or Ctrl+U,N) and running all the unit tests. I also closed the original session without saving the results.

I tried to characterise the issue of "Test not run" without success. If you can confirm if deleting the unit test session solves it, that would be good to know.

(Also using the latest VS2015 and R#)

Edit:

I managed to reproduce the "Test not run" by clearing a test result in my unit test suite, then running that test in debug with a breakpoint and terminating the debug session. Running all the tests now reports "Success: Test not run" even though the debugged test has now run through to completion.

(This is using R# menu | unit tests | run all tests from solution. The VS2015 Test Explorer display doesn't show the same test not run issue)

The easier method to clear the status is to right click it and choose Clear Test Result before running all the tests again

like image 92
Colin Avatar answered Sep 21 '22 16:09

Colin