Shrinking for Property Based Testing and Mutexes - Why, When & How


Details
> Host
This BEAM Languages United meetup is hosted by Erlang Solutions.
> Agenda
17:30-17:50 Registration
17:50-18:00 Intro
18:00-18:30 Talk #1: Shrinking for Property Based Testing - Dennis Palmer
18:30-18:50 Break: Snacks and soft drinks
18:50-19:20 Talk #2: Mutexes in Erlang - Why, When and How - Ulf Wiger
19:20-19:50 Mingle and Networking
> Talk 1: Shrinking for Property Based Testing - Dennis Palmer
Shrinking is the real magic of property-based testing — producing a small, human-readable test case whenever a larger random case causes a test to fail. However, it can be hard to do correctly.
Traditional approaches to shrinking require the shrinking logic to know specific details about the data type being simplified. When generated values are passed through a mapping function or combined in certain ways, it can break a shrinker written with the generated data type in mind.
Internal shrinking is based on the idea that shrinking inputs produces simplified outputs. When the underlying source of randomness is reduced it causes the generators to produce simplified test cases automatically. The final reduced test case is constructed as if the generator had been lucky and produced a small, readable test case by chance.
We will explore the Decorum library, an Elixir property-based testing library with shrinking that just works.
> Talk 2: Mutexes in Erlang - Why, When and How - Ulf Wiger
Erlang being a concurrency-oriented language, you'd think that it would have strong support for various types of mutual exclusion: locks, semaphores, etc. But, nah. Does that mean they aren't needed in Erlang? And if they are still needed, how can I implement them? Addressing these questions with some examples can actually teach us a thing or two about Erlang itself. The talk sticks to Erlang, but should be directly translatable to Elixir.
> Any allergies or special requirements?
We plan to serve some snacks and soft drinks during the event. Let us know if you have any allergies or any other special requirements.

Shrinking for Property Based Testing and Mutexes - Why, When & How