-
-
Couldn't load subscription status.
- Fork 3.2k
Open
Description
Description
Currently, Catch2 can be built as a DLL, but building test modules as DLLs (rather than executables) and running them via a custom test runner is difficult due to the following limitations:
- The test registry is global to the process. When Catch2 is linked dynamically, all loaded test DLLs share the same registry, causing all tests to be registered together and making isolation impossible.
- To run tests programmatically, one must use private APIs, which are undocumented and subject to change.
Feature Request
- Provide a way to define the test registry in a specific location (e.g., within each test DLL or the test runner), rather than always in Catch2.dll.
- Expose a public API to enumerate and run individual tests from a registry, enabling custom runners to load and execute tests from multiple DLLs in isolation.
Additional Context
This feature would enable large projects to reduce binary size by sharing a single Catch2 DLL, and allow integration with other test harnesses (e.g., Python's unittest or pytest) by wrapping Catch2 tests. It would also facilitate advanced workflows, such as running tests in-process with custom UI or helpers.
Metadata
Metadata
Assignees
Labels
No labels