Use property-based testing in the compiler source to ensure correctness #2739
DanikVitek
started this conversation in
Ideas & suggestions
Replies: 3 comments 5 replies
-
Automate Your Way to Better Code: Advanced Property Testing (with Oskar Wickström) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello! Could you share specific examples of where we could benefit from property testing over our existing snapshot tests and how we would implement them? Thank you |
Beta Was this translation helpful? Give feedback.
4 replies
-
Erlang has a great property based testing lib by John Hughes, the originally author of Haskell's QuickCheck. You can just write a gleam wrapper for that, I suppose. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What's good about property-based testing is that it somewhat enforces writing tests to be implementation-independent and allows testing many random scenarios against a set of "properties", hence the name.
https://lib.rs/crates/proptest is a good library for that. If a test fails, it tries to find the smallest failing case to help diagnose and then stores the failed cases, starting the next test run with their reevaluation.
Beta Was this translation helpful? Give feedback.
All reactions