Recently, I'm quite excited when reading about the idea of property based testing.
But I have 1 question that I still cannot find the answer anywhere:
How can property based testing ensures that it will test the corner cases every time?
To be more specific, let say I'm using ScalaCheck to test my division function:
def divide(a: Int, b: Int): Int
As the test cases will be generated randomly, how can I be sure that ScalaCheck will check the case where b = 0
every time?
Aucun commentaire:
Enregistrer un commentaire