-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
Many test cases require an instance of a MongoDB server to run against, but the CMake build and test system is oblivious to this fact and thus tests will fail. Some test cases will require certain functionality to be toggled on the server instance as well.
Catch2 can allow test fixtures via a constructor/destructor pair around a test case, but setting up a database on a per-test basis could be extremely wasteful. In CMake 3.7, CTest has a test fixtures feature which can be used to automatically set up and tear down test fixtures for other tests. These fixtures are loaded on a per-CTest-execution basis, so such fixtures could enable:
- Setup: Start a server instance with a scratch data path
- Execute all requested tests (possibly in parallel)
- Cleanup: Stop the server instance and delete the scratch data
(Refer: https://cmake.org/cmake/help/latest/prop_test/FIXTURES_REQUIRED.html )
- clones
-
CXX-2303 Automatic Server Instance Test Fixture Management
- Backlog