question

HyukMyeong-3703 avatar image
0 Votes"
HyukMyeong-3703 asked TianyuSun-MSFT edited

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

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++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.

1 Answer

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

Hello @HyukMyeong-3703 ,

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.

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.