Property-based testing stateful systems: a tutorial Posted on Feb 7, 2023 Property-based testing (PBT), i.e. generating random inputs and checking some property of the output, of pure programs is an established practice by now. It’s taught in introductory university classes and it’s part of test suites in industry. Most real world programs are not pure though, they are stateful. While it’s often possible to structure your program in such a way that the impure stuff is done in main, e.g...