C++ google tests not found

I have a mixed C#/C++ project and about half the time the test session explorer fails to find the C++ tests.

There also does not seem to be a way to force R# to re-scan to locate any missing tests


Comment actions Permalink

Hello Paul,

It would be great if you could help us reproduce it in any way - the solution where it happens or another repro case would be great.

The first toolbar button in the Unit Test Explorer window lets you refresh the list of tests, but it's unlikely to help you. What do you mean by half the time? Are tests listed in the Test Explorer window initially but then disappear after some edits? Are there icons next to the tests when you open a file with tests in the editor? Have you noticed what actions cause the tests to disappear?

Comment actions Permalink


It's tough getting to a repro as my solution has 91 projects 

So for example the C++ tests were in the Test Explorer/Unit Test Sessions window yesterday but today when I fire up VS, they are not present

If I right click on a C# unit test project there's an option to run/profile the tests, there's no such option on the C++ projects but I expect that's because of they way you are detecting the C++ unit tests

I notice that although the C++ compiles. R# is showing some red symbols 

  int main(int ac, char* av[])
    testing::InitGoogleTest(&ac, av);
    return RUN_ALL_TESTS();

Currently testing and RUN_ALL_TEST are red saying that it can't resolve those symbols

Comment actions Permalink

Unresolved symbols are probably the root cause. How do you use GTest - as a NuGet package, or is it included as an project? Is the problem that ReSharper cannot #include the google test header?


Please sign in to leave a comment.