common test error handler

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

common test error handler

Joel Reymont
How do yo make sure that bits created in init_per_testcase are cleaned up even if the test itself fails?

It appears that end_per_testcase is not called in case of error. Am I right?

        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
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: common test error handler

Joel Reymont
To be more precise, it appears that end_per_testcase is not called on a time trap, e.g.

suite() ->
    [{timetrap, {seconds, 60}}].

Is this expected behavior?

On Aug 1, 2011, at 4:15 PM, Joel Reymont wrote:

> How do yo make sure that bits created in init_per_testcase are cleaned up even if the test itself fails?
>
> It appears that end_per_testcase is not called in case of error. Am I right?

--------------------------------------------------------------------------
- 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
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: common test error handler

Vincenzo Maggio
In reply to this post by Joel Reymont
Hello,
I'm fairly new to Erlang, so I don't know yet test suite behaviour, but my here's my two cents: use a try/catch block.