rishenko's menagerie

musings about programming, with a focus on Elixir and erlang

rishenko • Oct 25, 2018 • 14 min read

Eavesdropping on GenServers Via Tracing

“How can I verify, during testing, that a GenServer or process received a message?” I have asked myself that on a number of occasions while working with Elixir, especially when interacting with dependencies outside of my control that generate processes and GenServers. There are many answers to the question, including but not limited to:

The focus of this post will be on the latter of the bunch - utilizing Erlang’s trace/3 function.  Read →