[erlang-questions] common test hiding errors?

Jon Watte jwatte@REDACTED
Sun Aug 14 22:01:12 CEST 2011


Will I get the error from the crashing process in the error log or in the
terminal?


If you run the code under test, separate from the common test framework, I
would expect that you get the same output you'd get in production. That may
or may not be good enough for you...

This is what I like about eunit, btw: you can call the unit test function
directly and it behaves just like in production. We ended up using eunit
even for integration tests, with some small wrapper functions to make sure
the necssary supervisors/applications are started/stopped. I imagine
changing test frameworks may be expensive for you, though.

Sincerely,

jw

--
Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world. Nevertheless,
whether we get there willingly or not, we shall soon have lower consumption
rates, because our present rates are unsustainable.




On Sun, Aug 14, 2011 at 8:29 AM, Joel Reymont <joelr1@REDACTED> wrote:


> On Aug 13, 2011, at 5:48 PM, Jon Watte wrote:
>
> > The question is: What behavior are you getting from the function under
> test? If it doesn't behave the way it's specified to, that should generate a
> test failure.
>
>
> I do get a test failure, although I'm not testing a function.
>
> I'm testing a system composed of various processes.
>
> > Once you've detected that there is a test failure, you should be able to
> re-run the test manually (say, from command line) to debug it.
>
>
> Will I get the error from the crashing process in the error log or in the
> terminal?
>
> It's a pointless exercise if I do not.
>
> > Is your request really something like: "When a CommonTest fails, how can
> I do post-mortem debugging on the failing test case"?
>
>
> Yes but I would be content with simply seeing the errors from crashing
> processes in the Common Test raw log file.
>
> I get the output from my invocation of error_log:error_report, etc. but I
> do not see errors from crashing processes.
>
> badarg? undef? Nowhere to be found and must be guessed.
>
> --------------------------------------------------------------------------
> - for hire: mac osx device driver ninja, kernel extensions and usb drivers
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110814/eeea04a4/attachment.htm>


More information about the erlang-questions mailing list