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

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,545 questions
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.
329 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 27,546 Reputation points Microsoft Vendor
    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