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.
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).
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.
Visual Studio Test Platform can run test assemblies in parallel.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With