Welcome to the new CppUtils documentation!
CppUtils::UnitTest::TestRunner
CLASSCentral test suite registry and execution engine.
Description
Section titled “Description”Public methods
Section titled “Public methods”Registers a test suite with the given name and test cases.
| Parameter | Description |
|---|---|
name | Unique name of the test suite. |
tests | Collection of test cases belonging to this suite. |
auto TestRunner::addTestSuite(const std::string& name, std::vector<std::string> prerequisites, std::vector<TestCase> tests) -> void;Registers a test suite with explicit prerequisite dependencies.
| Parameter | Description |
|---|---|
name | Unique name of the test suite. |
prerequisites | List of test suite names that must succeed before this suite runs. |
tests | Collection of test cases belonging to this suite. |
auto TestRunner::executeTest(std::string_view suiteName, const TestCase& test, const TestSettings& settings) const -> TestExecutionResult;Executes an individual test case in an isolated child process or worker thread.
| Parameter | Description |
|---|---|
suiteName | Name of the enclosing test suite. |
test | Test case to run. |
settings | Execution settings controlling timeouts and logging verbosity. |
Returns: Result outcome and diagnostics.
Executes all registered test suites respecting dependency order and configuration settings.
| Parameter | Description |
|---|---|
settings | Execution settings controlling verbose output, filtering, and abort conditions. |
Returns: Exit code: 0 on success, non-zero if any test suite failed.