Monthly Archives: August 2009

testing erlang gen_server with gen_server_mock

Testing by synchronous pattern matching Testing multi-process erlang gen_servers can be tricky. Typically one relies simply on pattern matching to verify that the response matches what you would expect. {expected, Response} = gen_server:call(Pid, hi). As long as the gen_server call hi returns expected as the first element of the tuple, then the tests pass. The technique is also the [...]
Posted in programming | Leave a comment

rough cut: erlang code coverage with rake

Here’s a quick, ugly version of how to get erlang code coverage using rake. This is a rough first draft and the gist below doesn’t include all the needed dependencies. To see the rest of the Rakefile, checkout skelerl.
Posted in erlang, tips | Leave a comment