There’s no way to trap those error messages at the moment. It’s on my list of things to do for YUI Test in the future.
Sent: Wednesday, November 26, 2008 10:42 PM
That makes sense, is there any way I can add a fail message to the
logger myself so that I can catch any errors in setup or teardown and
add them. The reason I prefer it in the test log is because my program
has a lot of debug output which gets placed into the browser console
so that any error messages from problems in a setup method get lost in
the noise of that at the moment.
> This was an intentional design decision in YUI Test. An error in a
> setUp() or tearDown() method technically isn't a test failure, it's a
> failure in code that is manipulating the testing environment. Both of
> these methods are handled separately from the main test body so they
> won't show up as test failures, instead, they'll show up as normal
> browser errors to help you identify the issue. The thinking is that
> setUp() and tearDown(), just like the rest of the test harness, should
> always work whereas tests may or may not fail based on other changes.
> Hope this helps,
> <things_and_ stuff@> wrote:"things_and_ stuff"
> > <things_and_ stuff@> wrote:is
> > >
> > > Hi
> > >
> > > I just found out that if I have an error in my setup method this
> > > not flagged as a failure in the test log display.
> > >
> > > Whats the best way to display an error in the setup method as a
> > > failure in the test log display?
> > >
> > Just reread my message and realised that I havent mentioned that the
> > setup method I am referring to is the one used in YAHOO.tool.TestCase