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

Christian <>
Wed Jan 28 15:37:58 CET 2009


On Wed, Jan 28, 2009 at 15:12, Steve Davis
<> wrote:
>
>  > simplest possible use of eunit for the terminally lazy...
>
> I've used JUnit and NUnit and indeed EUnit too. The real issue is "how
> much" I use them... or don't. All these frameworks are super-powerful
> and well featured BUT they all require coding (including Quviq's solution).
>
> That *is the barrier* to me (and apparently most coders) bothering with
> unit tests when stuck in the heat of things.

So you intend to write a new testing framework for each project when
stuck in this heat-of-things? Later when you need to supply a hot-fix
and unit-test that, in the head-of-things, you have this old
undocumented, semi-complete framework to dig up and understand?
*Sounds great* :-]

eunit is simple. no where close to test_server and ct in complexity.
eunit is now included in otp. eunit is therefore, or will become, the
"defacto standard" for unit tests.



To richard: the documentation of eunit is great. But it is that kind
of documentation that is great after you "have seen eunit in the wild,
and understood it". The docs answers all the questions then.  I
remember feeling a little bit confused on how it should be used in a
typical project.

I believe it is a case of how cognition begins with understanding the
concrete, first then moves on to the abstract.



Currently I have my test/ dir compile all source from ../src/* into ./
using an Emakefile that sets TEST to true. This is because I compile
production code without the eunit tests auto-exported, and thus i have
my eunit include and test-functions wrapped in -ifdef-endifs.



More information about the erlang-questions mailing list