[erlang-questions] Do you know what your code is doing at night?

Manfred Lotz <>
Fri Jul 14 09:10:22 CEST 2017


On Thu, 13 Jul 2017 21:01:17 +0000
Jesper Louis Andersen <> wrote:

> The question of linking unit tests and property based testing has been
> covered by Gerdes, Hughes, Smallbone, and Wang:
> 
> http://www.cse.chalmers.se/~nicsma/papers/unit-tests.pdf
> 
> The idea here is to ask: Suppose we have a property based test suite
> and a set of unit tests. Can we check if the unit tests are already
> covered by the property suite? The paper answers this in the
> affirmative. You can construct a system which can answer the
> question, with great probability.
> 
> It is highly useful in the case where you have a specification and the
> specification contains certain examples. By making sure your suite
> covers those examples, you gain the knowledge that your suite is not
> totally off w.r.t the unit test examples.
> 
> In a system with property based testing, you can often track each
> counterexample you've encountered in a small suite of things to try
> first. This allows you to quickly check for regressions rather than
> generating new traces to try. OTOH, if you don't regularly generate
> the cases, then chances are your generator is off and not being evil
> enough >:-)
> 


Thanks for this. Very interesting.

Manfred


More information about the erlang-questions mailing list