[erlang-questions] Re: testing asynchronous code
Tue Apr 20 02:26:10 CEST 2010
We've actually just written a paper about asynchronous testing, based on
testing ejabberd (where the message delivery events are asynchronous). The
paper talks about how to analyze a recorded trace, without falling into the
twin traps of complex code or expensive analysis. I've put a copy online at
if you're interested. (The paper will be published at AST 2010 in Cape Town
----- Original Message -----
From: "Tim Fletcher" <mail@REDACTED>
Sent: Monday, April 19, 2010 1:56 PM
Subject: [erlang-questions] Re: testing asynchronous code
>> Anyone have general strategies or advice for testing code that makes
>> heavy use of gen_server:cast? The best I could come up with was to
>> write _sync versions of all my functions, with gen_server:cast
>> replaced by gen_server:call, and then test those, but that seems both
>> clunky and fragile.
> How about using a "test spy" process to collect a trace of the cast
> messages and then make assertions against the resulting trace?
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
More information about the erlang-questions