|
ORE Studio 0.0.4
|
Testing infrastructure common to all test projects. More...
Classes | |
| class | database_helper |
| Provides database setup and cleanup utilities for tests. More... | |
| class | database_lifecycle_listener |
| Catch2 listener that manages tenant lifecycle for tests. More... | |
| class | logging_listener |
| Catch2 event listener that sets up logging for each test case and logs all test events to Boost.Log files. More... | |
| class | project_root |
| Provides access to project root directory for test resource location. More... | |
| class | scoped_database_helper |
| Provides database context for tests with optional RBAC seeding. More... | |
| class | test_database_manager |
| Manages test tenant isolation for parallel test execution. More... | |
| class | test_timeout_listener |
| Catch2 listener that enforces per-test timeouts. More... | |
Functions | |
| utility::generation::generation_context | make_generation_context (database_helper &h) |
| Creates a generation context populated from the test database helper. | |
| utility::generation::generation_context | make_generation_context (database_helper &h, std::uint64_t seed) |
| Creates a generation context with a specific seed. | |
| utility::generation::generation_context | make_generation_context (scoped_database_helper &h) |
| Creates a generation context populated from the scoped database helper. | |
| utility::generation::generation_context | make_generation_context (scoped_database_helper &h, std::uint64_t seed) |
| Creates a generation context with a specific seed. | |
| template<typename Awaitable > | |
| void | run_coroutine_test (boost::asio::io_context &io_context, Awaitable &&awaitable) |
Testing infrastructure common to all test projects.
Provides comprehensive testing utilities for ORE Studio components using Catch2. Key features:
Usage: Register the listeners in each test's main.cpp: CATCH_REGISTER_LISTENER(ores::testing::logging_listener) CATCH_REGISTER_LISTENER(ores::testing::database_lifecycle_listener)
The logging_listener initializes logging per test case, the database_lifecycle_listener creates/drops test databases.
| generation_context make_generation_context | ( | database_helper & | h | ) |
Creates a generation context populated from the test database helper.
Populates modified_by from db_user() and tenant_id from the test tenant.
| generation_context make_generation_context | ( | scoped_database_helper & | h | ) |
Creates a generation context populated from the scoped database helper.
Populates modified_by from db_user() and tenant_id from the test tenant.