Don't write tests, generate them!

Puneeth Chaganti (~punchagan)


21

Votes

Description:

Property-based testing (or Generative testing) is an interesting way of testing your code by defining properties of your code, and testing that they hold with random input.

QuickCheck in Haskell, where this idea originated, has been ported to several languages and the Hypothesis library provides an implementation of this for Python.

This talk aims to give an introduction to Property based testing in general, and to Hypothesis in particular. The talk will:

  • Present a case for using Hypothesis with examples
  • Explain properties
  • Briefly outline data generation and shrinking
  • Give common patterns of coming up with properties

Prerequisites:

The audience should be comfortable reading Object oriented Python code, that uses decorators. Experience in writing unit tests would go a long way to help appreciate the talk.

Content URLs:

  • A rough outline of the talk is here
  • Git repo for the talk is here
  • Slides for the talk are here

Speaker Info:

Puneeth likes to build tools that make lives of people (read as, mostly himself) easier. He has been programming in & teaching Python for the past 7 years and helping build tools for Engineers and Scientists.

He likes write tests to understand and improve the design of his code, and likes to enjoy the confidence given by a significant test coverage.

Speaker Links:

Puneeth has given a couple of talks(1, 2) at previous PyCons, and has helped conduct numerous tutorials and workshops as a part of his work at FOSSEE.

He blogs here, and his open-source contributions are here.

Section: Testing
Type: Talks
Target Audience: Intermediate
Last Updated:

No comments added so far.

Login to add a new comment.