JohnnyHendriks / TestAdapter_Catch2

Visual Studio Test Adapter for Catch2
MIT License
104 stars 29 forks source link

when test name has duplicated in multiple project, only 1 test show up correctly #59

Closed hihig2001 closed 2 years ago

hihig2001 commented 2 years ago

I used VS2022, CMake project. While I'm experimenting with testing framework, ctest, I found this problem. My CMake project has separated with multiple modules(not cpp moudle) and each has different Test executables. and when there are name has been duplicated with multiple tests, it seems that Test Explorer show only 1 result. while commandline with ctest works fine with it, i'm not sure that it is bug in vs or bug in adapter.

JohnnyHendriks commented 2 years ago

I'm afraid this test adapter only works in combination with a Visual Studio solution. Not with a CMake project directly. You can use CMake to generate a Visual Studio Solution, and open that one in the IDE.

Alternatively, I believe you can use the CMake scripts provided by Catch2 that register TEST_CASEs with CTest. In that case the build-in CTest-adapter will be used as far as I know.

hihig2001 commented 2 years ago

I understand, then it seems that built-in CTest-adpater's fault I assume.