Visual Studio 2015 does not detect unit tests: C ++

I am working on a C ++ project and I have developed some test cases. I was able to run the test cases until all the test cases disappeared from the test conductor. I want to say that test methods do not appear in the test explorer, even if the test project is compiled properly.

I followed the steps outlined here without any success.

This is what I did:

  • I deleted the contents of the %temp% folder.
  • I changed the default processor architecture to X64 . ( Test>Test Settings>Default Processor Architecture>X64 )
  • Restarted VS2015.
  • Restarted .
  • I tried running devenv /safemode (on the command line), no luck.
  • I tried running devenv /ResetSettings (on the command line), with no luck.

Notes:

  • My solution has only 1 test project, and now it contains only a few tests.
  • My project files are located on a network drive, as I am not allowed to store on the local computer.
  • I cannot disable antivirus software or firewall, and I do not have administrator privileges on my system.
+5
source share
1 answer

Look in your .vcxproj file and make sure it says

<ClCompile Include="[your-file-name].cpp" />

for each of your files.

0
source

Source: https://habr.com/ru/post/1268344/


All Articles