Dividing with ?LETSHRINK
Learn the ?LETSHRINK macro and where it can come in handy to understand the test cases that fail.
We'll cover the following...
The ?LETSHRINK
macro
As we use PropEr, we sometimes get stuck with generators creating huge data structures that take a long time to shrink and often don’t give very interesting results back. This often happens when some very low-probability failure is triggered, meaning that the framework had to generate a lot of data to find it, and has limited chances of shrinking things in a significant manner.
Whenever that happens, the ?LETSHRINK([Pattern, ...], [Generator, ...], Expression)
is what we need. Let’s take a look at how we can use the generators in practice.
Access this course and 1400+ top-rated courses and projects.