csoltenborn / GoogleTestAdapter

Visual studio extension that adds support for the C++ testing framework Google Test.
Other
143 stars 100 forks source link

Settings Helper Files are ignored on windows VS2017,Nuget. #307

Closed jshanab closed 4 years ago

jshanab commented 4 years ago

This is the for the need to have dependent dll's in the path for discovery to allow some devs to use the test explorer.

I can manually set the expanded Path extension in Tools->Options->Test Adapter for Google Test and the tests are discovered but without any Env/Props variables so I cannot check that in. (not all devs have same paths)

When I create the foo.exe.gta_settings_helper as in the documentation The variable I create TestPath is never seen. In fact I cannot see any indication that the file was loaded. I actually see a note about no project settings found using solution but I think that is about the .gta.runsettings.

I tried creating one of those and using the $(TestPath) in it, and I have removed all spaces from my paths but still no discovery. All errors are exit code -1073741515, which is confirmed on command line that it cannot find the dlls it needs. (When I run on command line to test as mentioned in the docs, is it suppose to find the .gta_settings_helper file??)

I am using the test adapter for google installed thru nuget(no choice) at version 1.8.0 as we are using v140.

csoltenborn commented 4 years ago

I guess the problem is that you are consuming GTA via NuGet. In that case, GTA can not find the solution settings file (see matrix in docs). Your only option to use a settings file is by manually choosing that file via Test -> Select Settings file. Of course, that file can be checked in, but every developer has to manually select that file.

Why are you using the NuGet version of GTA for your development machines? It's actually discouraged for a number of reasons (see matrix above)...

Despite that, have a look at the SampleTests solution, which contains a project making use of settings helper files.

Let me know whether that helps...

csoltenborn commented 4 years ago

Closed due to inactivity - feel free to reopen if problem remains..

jshanab commented 4 years ago

Thanks. I have been trying to convince the group to ditch nuget. It is the only thing we get that way and it is a reinstall on every new branch instance.

On Fri, Jan 10, 2020, 16:45 Christian Soltenborn notifications@github.com wrote:

Closed due to inactivity - feel free to reopen if problem remains..

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/csoltenborn/GoogleTestAdapter/issues/307?email_source=notifications&email_token=AAIZF5K7Q6WJUSVLA4CDPWDQ5DUA5A5CNFSM4KCHF4G2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIVJWJQ#issuecomment-573217574, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIZF5LYTKDLCPPHGXBLE33Q5DUA5ANCNFSM4KCHF4GQ .

csoltenborn commented 4 years ago

I see - good luck ;-)