Loading ...
Sorry, an error occurred while loading the content.

Yui setup errors are not displayed as test failures

Expand Messages
  • things_and_stuff
    Hi I just found out that if I have an error in my setup method this is not flagged as a failure in the test log display. Whats the best way to display an error
    Message 1 of 5 , Nov 26, 2008
    • 0 Attachment
      Hi

      I just found out that if I have an error in my setup method this is
      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?
    • things_and_stuff
      ... 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
      Message 2 of 5 , Nov 26, 2008
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "things_and_stuff"
        <things_and_stuff@...> wrote:
        >
        > Hi
        >
        > I just found out that if I have an error in my setup method this is
        > 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
      • nicholas.zakas
        Hi, 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
        Message 3 of 5 , Nov 26, 2008
        • 0 Attachment
          Hi,

          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,
          Nicholas



          --- In ydn-javascript@yahoogroups.com, "things_and_stuff"
          <things_and_stuff@...> wrote:
          >
          > --- In ydn-javascript@yahoogroups.com, "things_and_stuff"
          > <things_and_stuff@> wrote:
          > >
          > > Hi
          > >
          > > I just found out that if I have an error in my setup method this is
          > > 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
          >
        • things_and_stuff
          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
          Message 4 of 5 , Nov 26, 2008
          • 0 Attachment
            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.


            --- In ydn-javascript@yahoogroups.com, "nicholas.zakas" <nzakas@...>
            wrote:
            >
            > Hi,
            >
            > 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,
            > Nicholas
            >
            >
            >
            > --- In ydn-javascript@yahoogroups.com, "things_and_stuff"
            > <things_and_stuff@> wrote:
            > >
            > > --- In ydn-javascript@yahoogroups.com, "things_and_stuff"
            > > <things_and_stuff@> wrote:
            > > >
            > > > Hi
            > > >
            > > > I just found out that if I have an error in my setup method this is
            > > > 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
            > >
            >
          • Nicholas Zakas
            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. -Nicholas
            Message 5 of 5 , Dec 1, 2008
            • 0 Attachment

              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.

               

              -Nicholas

               


              From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of things_and_stuff
              Sent: Wednesday, November 26, 2008 10:42 PM
              To: ydn-javascript@yahoogroups.com
              Subject: [ydn-javascript] Re: Yui setup errors are not displayed as test failures

               

              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.

              --- In ydn-javascript@ yahoogroups. com, "nicholas.zakas" <nzakas@...>
              wrote:

              >
              > Hi,
              >
              > 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,
              > Nicholas
              >
              >
              >
              > --- In ydn-javascript@ yahoogroups. com,
              "things_and_ stuff"
              > <things_and_ stuff@> wrote:
              > >
              > > --- In ydn-javascript@ yahoogroups. com,
              "things_and_ stuff"
              > > <things_and_ stuff@> wrote:
              > > >
              > > > Hi
              > > >
              > > > I just found out that if I have an error in my setup method this
              is
              > > > 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
              > >
              >

            Your message has been successfully submitted and would be delivered to recipients shortly.