Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Visual Studio 2019, what is the difference between a green and white check icon for a passed test?

This seems to be new in VS2019. Sometimes passed tests show with a "white check on green background" circle, but sometimes the colors are inverted. The same applies to the failed test and not-run test icons. What is the significance here?

enter image description here

like image 834
JamesFaix Avatar asked Apr 13 '20 13:04

JamesFaix


1 Answers

The green and white check means that the last time the test ran, it succeeded, but was not evaluated on the latest test run.

If you're mysteriously having some of your tests not run, check the Output window, and set Show output from: to Tests. I was having a bunch of unit tests not run and give no indication of why. In my case the issue was Method Trace.Assert failed but inside a Finalizer which does not cause any tests to fail when using NUnit, but does prevent any more tests from running. The output window was the only way to figure this out.

NUnit does not fail on exception in Finalizer

like image 126
Leon Frickenschmidt Avatar answered Oct 17 '22 17:10

Leon Frickenschmidt