Well if we need just a single stacktrace per test it would work.

Consider an example: we need to make several attempts
and fail only if all of them fail. For example if we want try to
create an object
whose constructor takes a name of a security algorithm as an argument.
We do not know before which algorithms are installed in the user environment,
so we go through the list of algorithm names we are aware of and try to create
the object, catch exception, log it, and fail when all attempts are
unsuccessful.

Thanks,
Mikhail

On 1/25/06, Thorbjørn Ravn Andersen <[EMAIL PROTECTED]> wrote:
> Mikhail Loenko wrote:
>
> > fail() is not always convinient, for example, how would you print
> >
> >stack trace to fail()? Meanwhile stacktrace is most often enough
> >
> >
> If you need a stacktrace, why not just throw a RuntimeException at that
> point?  JUnit will then include the stack trace in the report.
>
> --
>  Thorbjørn
>

Reply via email to