CppCon, Aurora, CO

Continuous Regression Testing for Safer and Faster Refactoring

Switch to dark mode

Recording

Abstract

Making code changes to real-world software systems runs the risk of introducing unintended side-effects that are costly to find and fix. To mitigate this risk, engineering teams significantly invest in adopting various software testing practices. Despite best efforts, effectively and reliably identifying software regressions remains a challenge and results in long feedback cycles that hurt developer productivity. This problem is more pronounced in C++ software systems, given that their application domains often impose tight requirements on system safety and performance.

This talk shows you how continuous regression testing can help you find regressions in behavior or performance of your software during the development stage. It is a practical walk-through of how to build a regression testing framework in C++, how to use it to write effective regression tests, and how to integrate it with your CI pipeline to automate the execution of your tests as part of the CI or on a dedicated test server. It also includes recommendations on how to avoid common design pitfalls that lead to tests that are either flaky or untrustworthy or difficult to run at scale.

This talk also introduces a free and open-source software for continuous regression testing C++ applications. We will use a series of hands-on demos to showcase the end-to-end workflow of finding regressions in common C++ development scenarios including refactoring functions, upgrading dependencies, and updating the build toolchain. We also show a few less common use-cases such as profiling the size of binaries and tracking the exported symbols of a shared library, to inspire you to think how regression testing could unlock faster and safer refactoring for you and your team.