Matt Bachmann - Better Testing With Less Code: Property Based Testing With Python - PyCon 2016

preview_player
Показать описание
Speaker: Matt Bachmann

Standard unit tests have developers test specific inputs and outputs. This works, but often what breaks code are the cases we did not think about. Property based testing has developers define properties of output and has the computer explore the possible inputs to verify these properties. This talk will introduce property based testing and provide real world examples and patterns.

Рекомендации по теме
Комментарии
Автор

This is an extremely good talk. Thanks much!
I really liked the portion where you used it for comparing legacy things to new things... An indicator this might be a time to use it is when someone suggests we do things in side by side way.

skipodap
Автор

I don't know about Hypothesis, but in other frameworks, you can make strategies that act like mocking, and then make assumptions in your test. So, for example, a strategy would return a randomized user from the UserRepository, which is mocked instead of going to the db, then your test would "Assume(user.isAuthorized); or something like that. Now it generates a random user, but in this test, you specify the important part of the user, and only test those. (This is a response to the two questions in the Q/A)

xenopheliac
Автор

Excellent, and much needed. Too bad I found it by accident, because I would never have known to look for property based testing, but at least I did find it. Next stop, hypothesis!

malikrumi
Автор

Great talk! Hypothesis testing seems to be a powerful idea.

OmyTrenav
Автор

The topic is interesting, but the speaker rocks it out!

lerneninverschiedenenforme
Автор

Good presentation o hypothesis. Thanks.

ronemail
Автор

Funny guy, useful talk. Thank you. I'm greatful

HenockTesfaye
join shbcf.ru