Introduction to Custom Generators
Explore the importance of custom generators in property-based testing with PropEr in Erlang. Understand how they help focus tests on specific edge cases and improve bug detection beyond random input generation. Learn methods for gathering test statistics and enhancing test reliability.
We'll cover the following...
We'll cover the following...
Why use custom generators?
Until now, we have only used default generators in the properties that we have written. If we were to use these tools and techniques only, there is a chance that we could improve our tests by quite a bit. In the previous chapter, we saw how to test an encoder and a decoder with symmetric properties. Say we suspected there was a bug whenever there are more than 255 elements in a map. 255 is a ...