Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2008 Test View Panel Not Showing All Tests

I have a set of 6 MSTest test assemblies. When I bring up the Test View window and group by Project all of my projects show up save one. I cannot seem to make Visual Studio understand that this project is a unit test assembly.

Resharper's Unit Test Runner has no problem identifying this sixth assembly. So the assembly is fine from that stand point.

How does Visual Studio 2008 determine that an assembly is a unit test assembly?

I have compared the csproj files and found nothing out of the ordinary.

like image 852
NotMyself Avatar asked Nov 07 '08 18:11

NotMyself


People also ask

How do I run all test cases in Visual Studio?

To run all the tests in a default group, choose the Run icon and then choose the group on the menu. Select the individual tests that you want to run, open the right-click menu for a selected test and then choose Run Selected Tests (or press Ctrl + R, T).

How do I enable test in Visual Studio?

Visual Studio 2019 version 16.3 and earlier To specify a run settings file in the IDE, select Test > Select Settings File. Browse to and select the . runsettings file. The file appears on the Test menu, and you can select or deselect it.

Does Visual Studio run tests in parallel?

Visual Studio Test Platform can run test assemblies in parallel.


1 Answers

When creating a "Test" project in Visual Studio, the following element is added to the csproj xml in the very first PropertyGroup element:

    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

If you created your test assembly by hand, say by creating a new Class Library and adding a reference to Microsoft.VisualStudio.QualityTools.UnitTestFramework, this element will not be in your csproj file and visual studio will ignore all the tests located inside.

Add the element and all will be good again.

like image 166
NotMyself Avatar answered Oct 08 '22 01:10

NotMyself