How can I add a normal project into the test explorer?

Hyuk Myeong 21 Reputation points
2021-03-30T11:27:20.39+00:00

Hello, Everyone!

Currently, I just want to use a third party unit test framework for C++ in visual studio 2019
but the test framework doesn't have any related test adapters in the Marketplace yet.

And so I don't know how to add my project into test explorer.
In this situation, how can I add my project implemented with the new test framework into test explorer
as Native Unit Test Project or Google Test do?

Thank you

Developer technologies Visual Studio Testing
Developer technologies C++
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2021-03-31T09:25:56.347+00:00

    Hello @Hyuk Myeong ,

    Welcome to Microsoft Q&A forum.

    Native Unit Test Project is a project template provided by Visual Studio, and Google Test needs to install Test Adapter for Google Test component to run and test(see: How to use Google Test for C++ in Visual Studio). Both Native Unit Test Project and Google Test are integrated into the VS IDE, so Test Explorer can detect the tests of Native Unit Test Project and Google Test.

    I'm afraid, you can't add your project into test explorer, test explorer will detect the tests automatically(or after Build/Deploy...). Not sure what test framework you are using, I think it is needed to have a test adapter to make sure that Test Explorer can detect the tests. Perhaps you can contact the author of this third-party unit test framework to check how it works.

    BTW, here is the document about 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

Your answer

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