Pycon Israel 2021

Go Beyond Mock: on Mocks, Stubs and Fakes
05-02, 10:00–10:25 (Asia/Jerusalem), General Track 2

Developers use the term "mocks" and "mocking" when referring to several different testing practices.
The talk will standardize the terminology of Mocks, Stubs, and Fakes: their capabilities, the differences between them, and when to use each one.


We'll start with defining Mocks, Stubs, and Fakes: their capabilities, the differences between them, and how to code them.

Next, I'll show an iterative code example where we mock the same code using the above three methods. Every time we mock the same code differently, we get to test different things.

The talk summary would be based on the code examples: covering every mock's strengths and weaknesses, when is it appropriate to use each type of testing method, and a general wrap-up.

If you want to test your code effectively, this talk is definitely for you!


Session language

English

Target audience

Developers, Testers/QA

Started programming around 20 years ago, back at high school. My first programming language was C, and I still remember it fondly.

Over the years, I was lucky enough to use several programming languages and be a part of many code projects that made their way to production.

In the last few years, my focus has been on backend development using Python. Python is by far the most enjoyable programming language I know, give me a few minutes, and maybe I can make a believer of you :)

A constant learner and always looking to connect to interesting people.