|
|
|
|
|
by Noumenon72
2341 days ago
|
|
> A different testing style is property based testing (PBT) with contracts. By generating a random set of inputs, we cover more of the state space than we’d do manually. For someone new to the way you define property and contracts, the second sentence is not enough definition. The article made sense once I found other links in the article defining property and contracts: https://fsharpforfunandprofit.com/posts/property-based-testi... and https://www.hillelwayne.com/post/contracts/. I would summarize by saying > A different testing style is property based testing (PBT) with contracts. By testing invariant properties like commutativity instead of specific cases, and writing the functions under test with assertion-like contracts that fail if they ever attempt invalid behavior, we can test with random input data and cover more of the search space than we would manually. |
|
I had a this problem when writing a very similar blog post.