No tests found to run - while debugging/running Unit test cases -- Visual studio 2017 15.5.1
Problem
If I understand you correctly, this is something you observe:
when you run the tests, the following can be seen in the console:
[4/3/2018 2:26:13 PM Informational] ------ Run test started ------
[4/3/2018 2:26:14 PM Warning] No test is available in d:\...\UnitTestProject1.dll. Make sure that test discoverer & executors are
registered and platform & framework version settings are appropriate and try
again.
and the test explorer shows:
What could have happened, and it happened to me a couple of times, that the test discovery is set up for another architecture than your currently set one.
Example
Your current configuration is x64
but, the default test settings might have another one (e.g. x86):
Solution
If you _align the test settings with your current architecture (x86 → x64), the tests should run.
Manual cleanups should not be necessary nowadays, if the solution is configured consistently
I had same problem, make sure you set TestClass
to public
!
[TestClass]
public class CSharp_JavaScript_ServerResponse_Test
{
}
I had may versions of the Nuget Package installed, I consolidated them into the latest one and it fixed the problem
MSTest.TestAdapter MSTest.TestFramework