[erlang-questions] I Hate Unit Testing...

Steve Davis steven.charles.davis@REDACTED
Wed Jan 28 15:40:38 CET 2009


Yep, interesting and valid points, and there's a distinction to be
made.

My suggestion is for Unit Tests and so really doesn't cover System/
Subsystem Tests where the issues you describe will certainly become
major considerations. For that kind of testing, I have other ideas
cooking around - in particular there's big inspiration to be had from
Joe's UBF contracts...

BR,
/s

On Jan 28, 6:31 am, Tim Watson <watson.timo...@REDACTED> wrote:
> One thing I would like to make note of, is that this doesn't actually
> test the parts of your code that are likely to go wrong. In a
> language/platform that provides referential transparency, you can
> certainly provide 'proofs' about the behavior of your *pure* functions
> and have these automatically asserted/verified. The more problematic
> area, and the one on in which you're more likely to run in to issues,
> is that of impure functions (i.e. those with side effects). Hitting
> the file system, network I/O, talking to other (erlang) nodes and most
> importantly I would think - processes sending and receiving messages
> and responding to them. In this area, all kinds of things can happen -
> what order do messages come in vs. get processed, how are
> servers/services contacted and 'looked up', is registration
> synchronized correctly, do gen_servers get started up in the correct
> order, etc. These latter points seem more likely candidates for
> testing IMO, and having a "mock gen_server" and other associated tools
> at your disposal make this much easier.
> _______________________________________________
> erlang-questions mailing list
> erlang-questi...@REDACTED://www.erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list