Catch2 icon indicating copy to clipboard operation
Catch2 copied to clipboard

Make className accessible to CatchAddTests.cmake integration

Open Ext3h opened this issue 3 years ago • 1 comments
trafficstars

Description In the current state, neither the --list-tests nor the --list-test-names-only provide access to TestCaseInfo::className.

This is in contrast to the standalone reporters which partially do provide fully qualified class names as context information.

As a result, that piece of information is also missing for CatchAddTests.cmake and all tests are only available as a flat list.

This used to be a feature with ParseAndAddCatchTests.cmake and the PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME option. Since this is no longer based on direct parsing, --list-tests would be the best candidate to extend the highest verbosity level by the className attribute.

Additional context

While this isn't required for CTest to select a test, it would be preferable to have the test name stronger qualified for reporting in CI use cases.

Ext3h avatar Jun 27 '22 12:06 Ext3h

Sure makes sense.

horenmar avatar Jul 11 '22 20:07 horenmar