Search code examples
powershellvisual-studio-2019googletestcicd

How to run Gtest in powershell with set debug environment


Currenlty I am using Visual Studio community edition and Gtest.

When I run my test using the Visual Studio debug, my test are running fine

Debug environment

But when I build the solution and run my test fail.

command

Is there a way I can pass the PATH environment to the command I am runnig?

Try to set the PATH on powershell so it would load while running the command.


Solution

  • Thanks to @273k I was able to solve my problem.

    The reason this test did not pass on the command line, was due to this was being run on a different folder.

    Once I moved the relevant support files in the same folder the test started to pass