Visual Studio 2017 Test Explorer: How to set PATH?

Markus 1 Reputation point
2021-06-14T11:20:48.277+00:00

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
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
337 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 29,351 Reputation points Microsoft Vendor
    2021-06-15T09:34:12.757+00:00

    Hi @Markus ,

    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.
    0 comments No comments

  2. Markus 1 Reputation point
    2021-06-18T07:59:56.287+00:00

    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