Aller au contenu
Bienvenue sur la nouvelle documentation de CppUtils !

Central test suite registry and execution engine.

auto TestRunner::addTestSuite(const std::string& name, std::vector<TestCase> tests) -> void;

Registers a test suite with the given name and test cases.

ParamètreDescription
nameUnique name of the test suite.
testsCollection 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.

ParamètreDescription
nameUnique name of the test suite.
prerequisitesList of test suite names that must succeed before this suite runs.
testsCollection 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.

ParamètreDescription
suiteNameName of the enclosing test suite.
testTest case to run.
settingsExecution settings controlling timeouts and logging verbosity.

Retourne : Result outcome and diagnostics.

auto TestRunner::executeTests(TestSettings settings) -> int;

Executes all registered test suites respecting dependency order and configuration settings.

ParamètreDescription
settingsExecution settings controlling verbose output, filtering, and abort conditions.

Retourne : Exit code: 0 on success, non-zero if any test suite failed.