My tests' ExUnit.Callbacks.setup
function creates an ID that I want to include in ExUnit's output when a test fails. Is there a simple way to do this? I know that I could write a custom ExUnit.Formatter, but that seems like overkill.
The context of this question is that I'm using ExUnit to help write what are not unit tests but integration tests that span multiple microservices. The ID that the setup
function generates is a Spandex trace ID that persists across microservices. When a test fails, I want to know what its trace ID was so that I can grep all the microservices' logs for that ID.