Visual Studio 2013 doesn't discover unit tests

前端 未结 30 1965
余生分开走
余生分开走 2020-11-28 21:46

I have a simple solution in visual studio 2013 that is composed by one web project, one library project and one unit test project. When I open the solution and try to run th

相关标签:
30条回答
  • 2020-11-28 22:41

    Be sure your all projects are runing with the same configuration. Under your project's Properties => Debug => Platform in drop down list choose the appropriate platform (for me it was "Any CPU") as determined at your other projects.

    0 讨论(0)
  • 2020-11-28 22:42

    I'm having this issue from time to time. What works for me is to shutdown Visual Studio and go to folder:

    %LocalAppData%\Microsoft\VisualStudio\12.0\ComponentModelCache
    

    and delete it content.

    Once you open Visual Studio and load your project again Test Explorer should contain back your tests

    0 讨论(0)
  • 2020-11-28 22:42

    My problem was because my unit test method wasn't void, and it was receiving parameters.

    0 讨论(0)
  • 2020-11-28 22:44

    go to the project menu > Configuration Manager check your test project platform matches the rest of the project and is check to build then rebuild.

    0 讨论(0)
  • 2020-11-28 22:44

    Had the same issue; tests suddenly stopped being discovered.

    Nunit Test Adapter had become disabled somehow. Clicking enable in the extension manager fixed it for me.

    0 讨论(0)
  • 2020-11-28 22:45

    To get tests to show in the Test Explorer Window I had to install NUnit3 Test Adapter 3.0 which was not available in Package Manager.

    Downloaded from https://visualstudiogallery.msdn.microsoft.com/0da0f6bd-9bb6-4ae3-87a8-537788622f2d

    0 讨论(0)
提交回复
热议问题