
Hypothesis testing is pointless - dingoegret
You have a procedure. It has a state space of inputs and corresponding side effects of a state space of outputs. Wouldn&#x27;t it be great to test a wider state space of inputs using an automated method? Pick your tool, Haskell has Quickcheck, Python has Hypothesis and Rust has Proptest.<p>These tools are good at generating a state space of inputs. Okay, but a test is being able to assert the output or side effects. Can they do that? No.<p>Can we use some function to take the input they do generate and produce an expected output that can be asserted? Yes, copy and paste the procedure you are testing and make sure the output matc... oh wait. Yeah, completely pointless.<p>Is the only point with these tools is to test if some code crashes if you give it some bad input?
======
beshbeeshy
With these tools you don't test that the output matches you test that the
output has certain properties and it is called property-based testing. This
should help [https://fsharpforfunandprofit.com/posts/property-based-
testi...](https://fsharpforfunandprofit.com/posts/property-based-testing-2/)

