Note that there are some explanatory texts on larger screens.

plurals
  1. POMSTest: No tests are run because no tests are loaded or the selected tests are disabled
    text
    copied!<p>I have a c# solution with the following structure:</p> <pre><code>mySolution myProject myProject.MSTests References Microsoft.VisualStudio.QualityTools.UnitTestFramework sutMSTests.cs </code></pre> <p><strong>sutMSTests.cs:</strong> </p> <pre><code>[TestClass()] public class sutMSTests { [TestMethod] public void MyTest0() { Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(4, 2 + 2); } } </code></pre> <p>When I try to run the tests via Test, Run, All Tests In Solution, I get the following on the VS2008 status line:</p> <blockquote> <p>No tests are run because no tests are loaded or the selected tests are disabled.</p> </blockquote> <p>Test, Windows, Test View shows no tests. </p> <p>Note: I created the tests manually (works for xUnit.net) instead of using Microsoft's wizards.</p> <p>I've compared my hand created MSTest setup to the setup another test that I generated using the wizard and <strong><em>they appear to be</em></strong> sufficiently similar.</p> <p><strong>Question:</strong> What are the most likely causes of the error message above?</p> <p><strong>Edit 2010-02-25:</strong> More information:<br> I right clicked the <strong>Solution Items</strong> folder, and choose Add, New Project, type Test Projects,Test Documents::Visual Studio Test Project template. </p> <p>The new project's default do nothing test "TestMethod1" was detected and passed.<br> However, my test did not show up ... so I copied and pasted my test method into the default test test project "TestProject1". </p> <p>My test was detected in "TestProject" BUT not in its original location. </p> <p>I closely compared the files, organization, and settings of "TestProject1" with my hand created test project. </p> <p>At this point, I am <em>guessing</em> that some setting gets made by the Visual Studio Test Project template that is not easily detectable.</p> <p>imo, it should be just as easy to create a test project by hand as it is to create one with the Visual Studio Test Project template. </p> <p>please note: I'm not saying that I'm against using the Visual Studio Test Project template; for me, I like to understand what's behind the curtain since this makes me imho a much better programmer. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload