CppCon 2024 Back to Basics: Unit Testing in C++ -- Dave Steffen

unittesting-steffen.pngRegistration is now open for CppCon 2025! The conference starts on September 15 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year's conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2025!

Back to Basics: Unit Testing in C++

by Dave Steffen

Summary of the talk:

Unit Testing is a big, complicated subject. With good advice coming in from books, conference talks, and blog posts beyond count, it's a daunting topic even for experienced developers.  Can we make the subject more approachable?

Yes we can.  If we look a little deeper, there are some fundamental principles behind the advice. Further, these principles seem to belong to a small number of "domains", each addressing a very different aspect of unit testing and software development.

For example, "Test error conditions separately", "Tests should be easy to read", and "Write the unit tests first" are all great advice, but each is aiming for a very different goal.

In this talk, we'll survey these domains of unit testing practice, identify some of the basic practices involved in each, and put the larger discussion of unit testing into a more useful context.  We will also see how some unit testing practices enhance or conflict with others, and how these controversies reveal deep philosophical questions that have real consequences for how we go about the day-to-day activity of testing our code.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.