locked
Unit Test is showing under "Not Run Tests" apparently never completes but fine via "Debug Selected Test" RRS feed

  • Question

  • I have two tests in the same module under Microsoft Visual Sudio Professional C# 2015. One runs very quickly and shows up under "Passed Tests(1)" but the second test, which takes about 35-45 seconds (expected) but never shows up as passed or failed whether I select "Run Selected Tests" or run from a playlist or any other mechanism I can think of. 

    The only output I get is:

    ------ Run test started ------
    ========== Run test finished: 5 run (0:00:45.7903509) ==========

    But the test never moves from the "Not Run" list.

    System looks like this:

    Microsoft Visual Studio Professional 2015
    Version 14.0.23107.0 D14REL
    Microsoft .NET Framework
    Version 4.6.00081

    It completes fine if I run it in the 2015 using. However: When I run it in Visual Studio Premium 2013 I get this error:

    ------ Run test started ------
    An exception occurred while invoking executor 'executor://mstestadapter/v1': Type is not resolved for member 'log4net.Util.PropertiesDictionary,log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a'.
    ========== Run test finished: 0 run (0:00:40.5175635) ==========

    Wednesday, August 19, 2015 5:41 PM

All replies

  • Hi AndreaRL,

    >>but the second test, which takes about 35-45 seconds (expected) but never shows up as passed or failed whether I select "Run Selected Tests" or run from a playlist or any other mechanism I can think of. 

    >>It completes fine if I run it in the 2015 using. However: When I run it in Visual Studio Premium 2013 I get this error...

    Sorry for that I'm not very sure that whether your tests run well in VS2015 as you said that "Not Run Tests", but you also said that "It completes fine if I run it in the 2015 using". Would you mind letting us know more detailed information about this issue? What is the real issue now?

    Do you mean that your two tests work well in VS2015 now? But you couldn't run them in VS2013 premium version, am I right?

    >>An exception occurred while invoking executor 'executor://mstestadapter/v1': Type is not resolved for member 'log4net.Util.PropertiesDictionary,log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a'.

    Maybe you could share us the main code of your two test methods, based on the error message, I did some research about it, one similar thread which add certain code "CallContext.FreeNamedDataSlot Method" in your TestCleanup() method like this case.

    http://stackoverflow.com/questions/23661372/log4net-logicalthreadcontext-and-unit-test-cases

    CallContext.FreeNamedDataSlot("log4net.Util.LogicalThreadContextProperties");
    

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, August 20, 2015 8:12 AM