question

Markus-0051 avatar image
0 Votes"
Markus-0051 asked TianyuSun-MSFT commented

Visual Studio 2017 Test Explorer: How to set PATH?

How can I set the search path used by Test Explorer (Visual Studio 2017 - version 15.9.33)?

Currently, Test Explorer does not list my Test Cases because some of my DLLs cannot be found in the system search path, the DLLs are build by projects of my solution.

When I extend the system search path (PATH) by the DLLs build directories Test Explorer lists my tests.

How/where can I extend the system search path (PATH) for Test Explorer?

The following was tried without success:
- CMake set_tests_properties
- CMake add_test COMMAND
- Options -> Test Adapater for Google Test -> test execution -> PATH extension

vs-testing
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Markus-0051 avatar image
0 Votes"
Markus-0051 answered TianyuSun-MSFT commented

Hello Tianyu,
thank you very much for your reply.

Now, I set a specific output directory via CMAKE_RUNTIME_OUTPUT_DIRECTORY and can use Visual Studio Test Exporer as intended.

Best Regards,
Markus

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Markus, I'm happy to hear that, and thanks for sharing the solution which may help others. Have a nice day:)

0 Votes 0 ·
TianyuSun-MSFT avatar image
0 Votes"
TianyuSun-MSFT answered

Hi @Markus-0051 ,

Welcome to Microsoft Q&A forum.

I think this is not available for Test Explorer, but perhaps you can check if “AssemblyResolution” element helps to include the PATH you wants.

Besides, if you really need this feature for Test Explorer, you can report this issue to Visual Studio Product Team on our Developer Community(other document to refer to Visual Studio Test Explorer FAQ).

Best Regards,
Tianyu


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.