Share via

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
Developer technologies | Visual Studio | Testing
0 comments No comments

2 answers

Sort by: Most helpful
  1. 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

    Was this answer helpful?


  2. Tianyu Sun-MSFT 34,836 Reputation points Microsoft External Staff
    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.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.