Property-Based TDD Workshop at XP2013 and SPA2013

This June I will be running the Property-Based TDD workshop at the XP 2013 conference in Vienna and, with Keith Braithwaite, at SPA2013 in London.

This is a hands-on programming workshop to explore how property-based testing influences the TDD process and the designs it produces.

The TDD/BDD community has not embraced property-based testing, despite tools having been available for some time for most programming languages. TDD practitioners "triangulate" a property of the system by testing it against multiple examples, selected manually. This is not ideal. Triangulation does not explicitly define the property being tested, giving little scope for automating the selection of test data. People reading a test must infer the property from the data and name of the test, which can be difficult. It is easy to write tests with poor condition/decision coverage.

The property-based testing literature has focused on testing for quality assurance. It does not describe property-based testing tools being used to drive development, focus attention, measure progress, and obtain design feedback. A notable exception is Saff & Boshernitsan's article on JUnit Theories, The Practice of Theories: Adding "For-all" Statements to "There-Exists" Tests.

In this workshop we will investigate the intersection of TDD and Property-Based Testing.

Note that this is a workshop, not a tutorial. I don't know the answers. I'm hoping we can find some out together.

The workshop is suitable for developers with experience of Test-Driven Development. If you want to participate, you'll need a laptop or to find someone to pair with who has a laptop.

You can use any language you like, as long as you can find a property-based testing library for it and somebody to pair with. People have used Python, Ruby, Java and C#. It would be great to see people using Haskell, ML, F# or Scala.

If you can, try doing Keith Braithwaite's TDD As If You Meant It exercise beforehand, so we can compare and contrast doing the same exercise with different kinds of testing.

Copyright © 2013 Nat Pryce. Posted 2013-05-05. Share it.