I'd recommend you try to limit the exception thrown to the specific one you're looking for and, if possible, narrow it down to a specific method call as opposed to generalizing it to an entire test case. Secondly in your rescue block you can either call an assertion or flunk which will be caught by test unit as a failure.
begin
some test or method
rescue SomeExpectedException => ex
flunk("aut broken still, defect #15"+ ex)
end
That's at least one way to report what sounds like needs to be fixed in the aut without killing the test suite.
-Charley
On 8/19/06, Manish Sapariya <[EMAIL PROTECTED]> wrote:
If I enclose my test code in
begin
rescue
end
the test suite does not report any exception as failure?
Any ideas?
Regards,
Manish
Manish Sapariya wrote:
> Hi,
> Is there any way to keep on running my testsuite if one of my test raises
> exceptions which is not handled by the application under test gracefully.
>
> What if i catch all exception in my testing code?
> Will test unit report failure for those test cases?
>
> Thanks,
> Manish
>
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
