Python Test

107: Property Based Testing in Python with Hypothesis - Alexander Hultnér

03.27.2020 - By Brian OkkenPlay

Download our free app to listen on your phone

Download on the App StoreGet it on Google Play

Hypothesis is the Python tool used for property based testing.

Hypothesis claims to combine "human understanding of your problem domain with machine intelligence to improve the quality of your testing process while spending less time writing tests."

In this episode Alexander Hultnér introduces us to property based testing in Python with Hypothesis.

Some topics covered:

What is property based testing

Thinking differently for property based testing

Using hypothesis / property based testing in conjunction with normal testing

Failures saved and re-run

What parts of development/testing is best suited for hypothesis / property based testing

Comparing function implementations

Testing against REST APIs that use Open API / Swagger with schemathesis

Changing the number of tests in different test environments

System, integration, end to end, and unit tests

Special Guest: Alexander Hultnér. Sponsored By:PyCharm Professional: Try PyCharm Pro for 4 months and learn how PyCharm will save you time. Promo Code: TESTANDCODE22Links:Hypothesis homeHypothesis docsTest Fast, Fix More - Property based testing with Hypothesis by Alexander Hultnér - YouTubeQuickcheck, Grandfather of property based testingBeyond Unit Tests, Hillel Wayne, PyCon 2018Better Testing With Less Code, Matt Bachmann, PyCon 2016Choosing properties for property-based testing (F#)schemathesis: Hypothesis + Open API / Swagger for testing web applications

More episodes from Python Test