Hacker News new | past | comments | ask | show | jobs | submit login
The sad state of property-based testing libraries (stevana.github.io)
6 points by todsacerdoti 7 months ago | hide | past | favorite | 1 comment



Nice article, really like the survey bit. I know titles are just one tiny aspect, but they do set the tone, and in this case framing as a negative ("sad state") might put people off and may undermine the goal of getting people to adopt property-based testing. Though perhaps specifically this article is about stateful property-based testing, so it kinda comes off as negative against the existing library authors. I assume your intent is pure so rephrasing as "property-testing could be so much better" might be more positive. I am likely on the far end of sensitive on this only because I've spent a decade stuck in the negative view ("sad state" "everything sucks" "why did they design it that way" etc) and I'm trying to work my way out of it now. Anyways, too long rambling and mostly not even directed at the author necessarily but comment readers more generally.

As for how to get more adoption of property-based testing and/or stateful and/or parallel property-based testing, is there any way to do this from outside the language level? So you'd write your tests to consume commands and produce results from stdio, then an external process can drive the testing process. Can you run these in a VM to get deterministic thread scheduling for any language? Fakes could be implemented in any language and use the same stdio mechanism. And then build up a public set of known-good fakes. Ideally the fakes could be composable but not sure that is easy. Of course for bespoke things you'll need a bespoke fake, but I am thinking of the general stuff like a dictionary, queue, etc. This is all sparked because I've been thinking of how to build a giant inter-language inter-library testing database, initially with unit tests but this made me think about how to incorporate property based tests.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: