<div dir="ltr">The question of linking unit tests and property based testing has been covered by Gerdes, Hughes, Smallbone, and Wang:<div><br></div><div><a href="http://www.cse.chalmers.se/~nicsma/papers/unit-tests.pdf">http://www.cse.chalmers.se/~nicsma/papers/unit-tests.pdf</a><br></div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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 >:-)</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 13, 2017 at 3:11 PM Manfred Lotz <<a href="mailto:ml_news@posteo.de">ml_news@posteo.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 13 Jul 2017 07:16:06 -0400<br>
Fred Hebert <<a href="mailto:mononcqc@ferd.ca" target="_blank">mononcqc@ferd.ca</a>> wrote:<br>
<br>
> On 07/13, Manfred Lotz wrote:<br>
> >I think Fred could add a section "Unit testing versus property based<br>
> >testing" and add your explanations.<br>
> ><br>
><br>
> Similar content is already part of the book, though not necessarily<br>
> in a dedicated section.<br>
<br>
I think it is worth to make your and Loic's answer a dedicated section<br>
or subsection.<br>
<br>
<br>
--<br>
Manfred<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>