Hunting Bugs While Sleeping by Paul Lorett Amazona
Channel: FOSSASIA
Date: 31/03/2019

16 March 2019 10:00, Lecture Theatre

The key idea of property based testing is that rather than writing a test that tests just a single scenario, you write tests that describe a range of scenarios and then let the computer explore the possibilities for you rather than having to hand-write every one yourself.Think of a normal unit test (example-based) as being something like the following:
1. Set up some data.
2. Perform some operations on the data.
3. Assert something about the result.

Using property-based tests, your approach will look like this:
1. For all data matching some specification.
2. Perform some operations on the data.
3. Assert something about the result.

In this talk, I'll share on the following:

Short intro to property-based testing (PBT)
Few examples/approaches in using it
Adding PBTs to a Continuous Integration Build (so it can hunt bugs while you're sleeping :-) )