Talk: Test Doubles: Fake it ‘til you mock it!
Speakers directory
Speaker:
Matthew Kleiman
Talk description
Title:
Test Doubles: Fake it ‘til you mock it!
Short synopsis:
What’s really happening when you use a library to mock, fake, spy, and stub in a test? In this talk, Matt Kleiman will define a class (from scratch!) to represent each different type of test double to help you understand what’s happening under the hood when you use these techniques, which are critical to any TDD practice. You’ll be able to implement your own test doubles in your tests, or at least have a complete understanding of what that mocking library is doing, the next time you use it.
Max size: 500 chars
Long synopsis (optional):
I plan to talk about the 5 types of test doubles (Dummy, Stub, Mock, Spy, Fake), why and how they are used, and how these show up in the plethora of open-source mocking libraries available. In order to go deep on the test double concept, I want to show code to exemplify the test doubles and their uses. I’ll come up with a fun, themed example to illustrate use cases for each type of test double. Then I’ll demonstrate how any programmer can write their own test double classes instead of relying on a library-- the concepts are surprisingly straightforward. I’ll also show how the same goals can be accomplished using common libraries. My intention is not that everyone starts writing their own test doubles all the time, but to empower programmers to 1) feel comfortable writing their own if they have a need for it and 2) understand what these libraries are doing when they use them.
Max size: 5000 chars
Tags:
Speaker directory:
Listed in directory
Not listed
Speakers directory