2 ms·
> Property testing is where you vary the parameters, perhaps within certain well defined constraints, and through randomization ensure certain coverage. No - t
by BerislavLopac 6y ago
> Property testing is where you vary the parameters, perhaps within certain well defined constraints, and through randomization ensure certain coverage.
No - this would be akin to saying "unit testing is when you use assert statements".
Varying the parameters -- and using far more than simple randomisation -- is just a technique; the purpose of property testing is that the behaviour of the unit (or system) under test fulfills certain properties, in ma mathematical sense of the word. For a simple example: if you're writing a function that is adding two integer numbers, you want to test that it satisfies all the properties of addition [0]. So your tests need to validate against a number of combinations of input values, many of which are not random (e.g. to test for the "successor" property one of them needs to be 1).
[0] https://en.wikipedia.org/wiki/Addition#Properties https://en.wikipedia.org/wiki/Addition#Properties