Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-2302

Finer-Grained Test Definition for Catch2 and for CTest

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Testing
    • None

      Catch2 supports dynamically defining test cases, and also supports dynamically loading them into CTest. Instead of a monolithinc "test_unified_format_spec" test case from a single test executable, we can use `registerTestCase()` in Catch2 to dynamically add test cases for each test defined in the test spec files.

      Additionally, the catch_discover_tests() CMake command (from Catch.cmake) can be used to register each Catch2 test case as a test in CTest. From this, CTest can track and execute each Catch2 test case individually, including in parallel, respecting `--rerun-failed`, detecting skips, etc.

            Assignee:
            Unassigned Unassigned
            Reporter:
            colby.pike@mongodb.com Colby Pike
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: