EUnit 2.0 alpha testers wanted
Wed Apr 26 12:28:29 CEST 2006
On Tuesday, 25 de April de 2006 22:09, Richard Carlsson wrote:
> Pupeno wrote:
> > My unit tests using EUnit 2.0 have grown a lot, in fact, since I am doing
> > a kind of meta-testing, they grow exponentially as my data structures
> > grows. I've already reached the point where Erlang crashed after
> > exhausting all my 700 MB or RAM (or so it seemed after the error
> > message).
> > Can I continue to work with a huge number of tests but not having take
> > make a list of all of them ? That is, testing one at a time and and
> > either try all the tests and return how many failed and how many didn't
> > or halt at first failed test and show the debugging output to solve the
> > problem. (If I make a change and suddenly 5000 tests don't pass, then
> > I'll have to wait more than 30 seconds for Emacs to show all the output
> > of the failure and I am interested only in the first one).
> > Up to now I am simply testing with eunit:test/1; maybe my answer relies
> > on eunit_server ? I couldn't really understand how it works.
> > Thanks.
> It is a sort of weakness of the current implementation that it assumes
> that you can produce a complete list of all the tests in advance. I did
> not expect to run into trouble so quickly, but you have shown that this
> needs to be addressed somehow. Thank you for giving the system such a
> thorough workout. :-)
I think a way to solve it is that the test function would take a 'previous
result' as parameter and give a result, so as you run tests you can go
getting results and accumulating, wether you stop at first failure or not
would be up to the user (with some function to test if in a result there's a
The result structure would contain tests made, passed, etc and a list of
errors if neccesary.
> Meanwhile, I can only suggest that you try to generate and run smaller
> subsets of tests one at a time. Also, you might want to think about
> whether you really want to do exhaustive testing. Perhaps you should
> have a look at QuickCheck, and try some probability-based checking.
I kinda emulated QuickCheck with Eunit by generating big lists and picking up
some cases, I loved QuickCheck when codding on Haskell. I didn't expect to
find an implementation of QuickCheck for Erlang and there seems to be a kind
I'll take a look at it.
Pupeno <pupeno@REDACTED> (http://pupeno.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the erlang-questions