BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage Presentations An Introduction to Property Based Testing

An Introduction to Property Based Testing

Bookmarks
48:21

Summary

Aaron Bedra focuses on describing a system as a series of models that can be used to systematically and automatically generate input data and ensure that a code is behaving as expected. Bedra discusses property based testing and how it can help one build more resilient systems and even reduce the time needed to maintain a test suite.

Bio

Aaron Bedra is Chief Security Officer at eligible.com. He is the creator of Repsheet, an open source threat intelligence framework. Bedra is the co-author of Programming Clojure, 2nd Edition and a frequent contributor to open source software.

About the conference

Software is Changing the World. QCon empowers software development by facilitating the spread of knowledge and innovation in the developer community. A practitioner-driven conference, QCon is designed for technical team leads, architects, engineering directors, and project managers who influence innovation in their teams.

Recorded at:

May 11, 2016

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Property Based Testing

    by Liam Williams,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    This is the first time I have seen property based testing. It sounds horrible.

    The examples provided in the talk have given me the impression that to write a property based test you will essentially have to remodel the system under test to be able to "test" it. This seems pointless, since you will end up (as in the talk) reimplementing the method under test in your test, and who is to say that this will be correct (e.g. a bug in the test). This is the whole reason that, with a proper test driven approach, you will explicitly declare your boundary cases and some "happy" and "sad" paths.

    I can see some limited application for this approach in understanding a legacy system, e.g. checking whether your assumptions about how you think the system works hold, but beyond this I would advise steering clear and sticking to explicitly declaring the behaviour (and intent) of your system in your tests.

  • Re: Property Based Testing

    by Jeff Hain,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    "This seems pointless, since you will end up (as in the talk) reimplementing the method under test in your test, and who is to say that this will be correct (e.g. a bug in the test)."

    Reimplementing the method in test works well when that implementation can be much simpler than the one to test, which would be complicated for performance reasons.
    You run both implementations against a lot of random inputs, and check that they always compute identical outputs.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT