2

I converted a project with nunit tests, so that it had mstests instead. It compiles, and when I right click on the project, I can select "run unit tests." It works, and the tests execute successfully.

However, I cannot see my tests in either the "Test List Editor" or the "Test View." I've tried:

  • selecting the "refresh" button in both those lists
  • rebuilding the solution
  • re-starting visual studio
  • Activated background discovery (I do have VS 2010 SP1, and resharper)

None of these, alone or in combination, has worked. What else can be tried, to force Visual Studio fully to recognize these tests?

Community
  • 1
  • 1
Brent Arias
  • 29,277
  • 40
  • 133
  • 234

2 Answers2

5

The answer, I found, is that I must convert a class library to an MsTest project.

Brent Arias
  • 29,277
  • 40
  • 133
  • 234
  • Yes you need to mark the class library with special 'wellknown' GUIDs for it to gain 'test-assembly' status within the IDE. – Gishu Jun 12 '12 at 09:30
0

Also make sure that your test class is public, I spent almost one day trying to figure out why the MS test frame can't discover my test until I modified the access modifier from the default to public