Some things I’ve noticed I have to do from time to time to get tests to show up properly.
-
If your solution is in a protected drive that you need administrator access to read/write, sometimes only a portion of the tests come up. Definitely run VS as administrator in that case.
-
If your solution is 64 bit, make sure that Test > Test Settings > Default Processor Architecture is set to x64. Sometimes it gets set to x86. Set it to x64, then rebuild.
-
Sometimes just restarting Visual Studio does the trick because the test explorer will start up again.
-
Don’t forget to actually build the test project/solution. (If you want it to get built with the rest of the projects, right-click on your solution > Properties > Configuration Properties > Configuration > check the “Build” box for your test project)
-
Ensure the tests are in a
public
section of your test class