Hypothesis testing is pointless
You have a procedure. It has a state space of inputs and corresponding side effects of a state space of outputs. Wouldn'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.
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.
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.
Is the only point with these tools is to test if some code crashes if you give it some bad input?
1 comment
[ 2.6 ms ] story [ 14.7 ms ] thread