Ejabberd is an instant messaging server with lots of asynchronous behaviour. Such asynchronous behaviour is awkward to test, because of its inherent non-determinism. Variable event order and timing uncertainties can easily lead test cases to fail when they ought to pass, generating "false positives" that hinder testing. Yet coping with all possible event orderings and timings can make test cases hopelessly complex. When test cases are generated, these problems become even harder.
In this talk, we'll present a new way of expressing asynchronous properties that avoids these problems, and show how we used it to develop a simple QuickCheck specification for ejabberd message delivery.