Mastering CTest: Streamlining Your C++ Testing Workflow
summary
Shows how to wire CTest into CMake: include the CTest module, register tests with add_test, and run them with ctest using -R/-I filters; demonstrates three styles—hand-rolled runner, GoogleTest, Catch2—and a reusable CMake snippet that creates a coverage target via lcov/genhtml producing clickable HTML. Adds a one-step build-and-test target, parallel and retry runs, CDash upload for reporting (CDash), and a real flaky example that fails ~1/50 runs which is isolated by a 2000-run nightly job. Repository and exact CMake snippets are available.
AI-written summary · about
