Test Driven Development in C/C++ opens with a high-level look at agile software development and the test-driven approach to building software. A lab reinforces this right away, where attendees build their own personal CI server. Attendees get familiar with unit testing, smoke tests, integration tests, system testing, acceptance testing, and non-functional tests in the context of TDD. They then put the basics into practice writing tests with GoogleTest. A module on the art of refactoring follows. A paired lab works through classic TDD Katas to build muscle memory for small, safe code changes. Day one closes with test doubles, covering mocks, fakes, stubs, spies, and dummies. Attendees use GoogleMock to isolate the code under test from its real dependencies.
Each day splits into four modules that divide evenly between lecture and hands-on lab work, giving participants practical experience with TDD tools and concepts. Day two surveys testing tools across the C/C++ ecosystem, including Catch2, doctest, Boost.Test, GoogleTest/GoogleMock, and CppUTest. A lab has attendees write inline tests using Catch2’s header-only syntax. A module on Boost.Test covers its organization, templates, and test suites, with a lab that applies that structure to more complex tests. The class then dives into fixtures, test output, and the execution monitor. It wraps up with unit testing and code coverage, measured using gcov, gcovr, and lcov.
By the end, attendees have a broad view of how to test C and C++ code early and often. Along the way, they work with fixtures, test suites, sub-tests, doubles, and mocks. They also gain hands-on experience with many of the practical tools used in these environments. This prepares them to put the practice to work in production.
Who Should Attend
Developers, DevOps and QA Staff, Architects and Technical Managers
What Attendees Will Learn
Upon completing Test Driven Development in C/C++, attendees will be able to:
- Apply agile and test-driven software development practices
- Write unit tests with GoogleTest and apply refactoring techniques
- Apply TDD Katas to build refactoring skill
- Use test doubles, including mocks, fakes, stubs, and spies with GoogleMock
- Write tests using Catch2 and other C/C++ testing tools
- Organize tests using Boost.Test suites and templates
- Work with test fixtures, output, and execution monitors
- Measure code coverage using gcov, gcovr, and lcov
Prerequisites
Attendees must be familiar with C++.