[erlang-questions] common test hiding errors?

Jon Watte jwatte@REDACTED
Sat Aug 13 18:48:17 CEST 2011


Here's how I would view the situation:

Erlang allows processes to crash -- "let it crash!"

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.

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.


Is your request really something like: "When a CommonTest fails, how can I
do post-mortem debugging on the failing test case"?


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 Wed, Aug 10, 2011 at 3:39 AM, Joel Reymont <joelr1@REDACTED> wrote:

>
> On Aug 10, 2011, at 9:09 AM, Lukas Larsson wrote:
>
> > Common Test detects any crashes which happen in the same process as the
> testcase is run in. If a crash happens in another process, it will not be
> detected unless you in your testcase check whether said process is alive or
> is linked to it. Could this be what is going wrong?
>
> Yes, that's what's going on. I'm cannot link to all the processes in the
> "system under testing", I think that's unrealistic.
>
> I do expect to be told when something goes wrong, though, get a printout in
> the log, etc.
>
> This is in line with what EUnit does, for example.
>
> > If you're still having difficulties, could you post a minimal example of
> what you are trying to do? It's difficult to guess what could be the problem
> without an example to look at.
>
> It's another process that's crashes.
>
> > Also if you want to have the SASL and error_logger output in your common
> test logs instead of redirecting them to a local file you might want to use
> the cth_log_redirect hook found here
> https://github.com/garazdawi/cth_tools.
>
>
> I'm perfectly fine with redirecting error_logger output to a local file but
> it seems that it shows up just fine in the CT logs.
>
> What's not showing up is error messages from other processes crashing, a
> completely unintuitive behavior, I think.
>
>        Thanks, Joel
>
> --------------------------------------------------------------------------
> - for hire: mac osx device driver ninja, kernel extensions and usb drivers
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110813/81dfa46d/attachment.htm>


More information about the erlang-questions mailing list