~/talk

“Mocking Frameworks considered harmful”

Talkat CppCon 2017 · 2017-09-24..09-29· [testing, software-architecture]
slides:none on file

Argues that common C++ mocking frameworks (GoogleMock, Trompeloeil) introduce macro-heavy DSLs, late runtime verification on object destruction, and fragile white-box tests that over-specify call sequences and increase coupling. Shows practical alternatives: refactor to template seams or extracted interfaces, use IDE refactorings and linker/preprocessor seams, or generate plain C++ call traces with Mockator in Cevelop. Notes quirks like ON_CALL warnings driving overuse of EXPECT_CALL and demonstrates the generated stubs and traces work and give clearer failures.

AI-written summary · about

  1. 0:00Introduction to mocking frameworks
  2. 1:47What is mocking and why use it
  3. 10:29When to use test doubles
  4. 17:40Introducing seams for testability
  5. 24:53Mocking frameworks in C++
  6. 35:00Problems with mocking frameworks
  7. 41:46History and limitations of mocking
  8. 47:42Dangers of over-mocking
  9. 51:17Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.