Why does visual studio 2012 not find my tests?

后端 未结 30 3219
盖世英雄少女心
盖世英雄少女心 2020-12-07 10:51

I have some tests that use the built in Microsoft.VisualStudio.TestTools.UnitTesting, but can not get them to run.

I am using visual studio 2012 ultimat

30条回答
  •  [愿得一人]
    2020-12-07 11:05

    It looks like NUnit Framework 2.6.4 does not work well with NUnit Test Adapter. In the website it mentions the test adapter will only work with NUnit Framework 2.6.3.

    This was my problem: 1. I had downloaded NUnit and NUnit Test Adapter separately through Nuget in the VS2012. Somehow NUnit got updated to 2.6.4 Suddenly i did not see my test cases listed.

    Fix:

    1. Uninstall Nuget and Nuget Test adapter

      a. Go to Tools> Nuget > Nuget Pkg manager > Manage Nuget Pkg for Solution

      b. List installed packages

      c. Click manage

      d. Un-check your projects

    2. Install NUnit Test Adapter including NUnit 2.6.3 Framework

    3. Clean/Rebuild solution

    4. Open Test > Test Explorer > Run All

    I see all the test cases

    Hope this helps

提交回复
热议问题