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

Grouping TestCases from different Pages in TestSuites

Expand Messages
  • Bernd Schiffer
    Hi. I have several TestCases divided into several HTML pages. Most of the TestCases are working on a given DOM (part of the setup) provided by the HTML page
    Message 1 of 5 , Jun 26, 2008
    • 0 Attachment
      Hi.

      I have several TestCases divided into several HTML pages. Most of the
      TestCases are working on a given DOM (part of the setup) provided by
      the HTML page itself, so that's why I want to group my TestCases
      around a HTML page.

      Now I'm looking for a way to execute all my TestCases all together in
      one single step.

      Therefore I looked into TestSuite, but it seems that you can only add
      TestCases or other TestSuites, but no HTML-Pages.

      Is there a way to collect all the TestCases and execute them in one
      single step?

      Bernd
    • Nicholas C. Zakas
      Hi Bernd, There s no way to add multiple Test Cases in different pages to the same Test Suite. There is, however, a way to run multiple pages of tests one
      Message 2 of 5 , Jun 26, 2008
      • 0 Attachment

        Hi Bernd,

         

        There’s no way to add multiple Test Cases in different pages to the same Test Suite. There is, however, a way to run multiple pages of tests one after the other. It’s not documented mostly because it’s a bit hacky and I haven’t had the time to build it out appropriately, but it is functional. The object is called TestManager. Rather than explaining how to use it, it’s probably easier to look at an example

         

        If you look in the YUI zip file, there is a tests directory. The YUI.html file uses the TestManager to run tests on a series of pages. Each page is only responsible for telling the main page that it’s ready to be executed. Each of the other HTML files in that directory can be run either as a standalone page or as part of the YUI.html page. I’d recommend taking a look at both the YUI.html file and one of the simpler unit test files such as profiler.html for a good example of how to set this up.

         

        -Nicholas

         

         

         


        From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of Bernd Schiffer
        Sent: Thursday, June 26, 2008 5:37 AM
        To: ydn-javascript@yahoogroups.com
        Subject: [ydn-javascript] Grouping TestCases from different Pages in TestSuites

         

        Hi.

        I have several TestCases divided into several HTML pages. Most of the
        TestCases are working on a given DOM (part of the setup) provided by
        the HTML page itself, so that's why I want to group my TestCases
        around a HTML page.

        Now I'm looking for a way to execute all my TestCases all together in
        one single step.

        Therefore I looked into TestSuite, but it seems that you can only add
        TestCases or other TestSuites, but no HTML-Pages.

        Is there a way to collect all the TestCases and execute them in one
        single step?

        Bernd

      • Nicholas Zakas
        Hi Bernd, There s no way to add multiple Test Cases in different pages to the same Test Suite. There is, however, a way to run multiple pages of tests one
        Message 3 of 5 , Jun 26, 2008
        • 0 Attachment

          Hi Bernd,

           

          There’s no way to add multiple Test Cases in different pages to the same Test Suite. There is, however, a way to run multiple pages of tests one after the other. It’s not documented mostly because it’s a bit hacky and I haven’t had the time to build it out appropriately, but it is functional. The object is called TestManager. Rather than explaining how to use it, it’s probably easier to look at an example

           

          If you look in the YUI zip file, there is a tests directory. The YUI.html file uses the TestManager to run tests on a series of pages. Each page is only responsible for telling the main page that it’s ready to be executed. Each of the other HTML files in that directory can be run either as a standalone page or as part of the YUI.html page. I’d recommend taking a look at both the YUI.html file and one of the simpler unit test files such as profiler.html for a good example of how to set this up.

           

          -Nicholas

           

        • Bernd Schiffer
          Hi Nicholas. Thank you for your reply. Works great! Is there a way to let TestManager find all the necessary pages itself, e.g. passing it the directory where
          Message 4 of 5 , Jun 30, 2008
          • 0 Attachment
            Hi Nicholas.

            Thank you for your reply. Works great!

            Is there a way to let TestManager find all the necessary pages itself,
            e.g. passing it the directory where it could search recursivly for
            *.html-Files?

            Bernd

            --- In ydn-javascript@yahoogroups.com, "Nicholas Zakas" <nzakas@...>
            wrote:
            >
            > Hi Bernd,
            >
            >
            >
            > There's no way to add multiple Test Cases in different pages to the same
            > Test Suite. There is, however, a way to run multiple pages of tests one
            > after the other. It's not documented mostly because it's a bit hacky and
            > I haven't had the time to build it out appropriately, but it is
            > functional. The object is called TestManager. Rather than explaining how
            > to use it, it's probably easier to look at an example
            >
            >
            >
            > If you look in the YUI zip file, there is a tests directory. The
            > YUI.html file uses the TestManager to run tests on a series of pages.
            > Each page is only responsible for telling the main page that it's ready
            > to be executed. Each of the other HTML files in that directory can be
            > run either as a standalone page or as part of the YUI.html page. I'd
            > recommend taking a look at both the YUI.html file and one of the simpler
            > unit test files such as profiler.html for a good example of how to set
            > this up.
            >
            >
            >
            > -Nicholas
            >
          • Nicholas Zakas
            Hi Bernd, Sadly, that s not possible. It would require file system access from JavaScript which is strictly prohibited for security reasons. Regards, Nicholas
            Message 5 of 5 , Jul 1, 2008
            • 0 Attachment

              Hi Bernd,

               

              Sadly, that’s not possible. It would require file system access from JavaScript which is strictly prohibited for security reasons.

               

              Regards,

              Nicholas

               


              From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of Bernd Schiffer
              Sent: Monday, June 30, 2008 10:30 AM
              To: ydn-javascript@yahoogroups.com
              Subject: [ydn-javascript] Re: Grouping TestCases from different Pages in TestSuites

               

              Hi Nicholas.

              Thank you for your reply. Works great!

              Is there a way to let TestManager find all the necessary pages itself,
              e.g. passing it the directory where it could search recursivly for
              *.html-Files?

              Bernd

              --- In ydn-javascript@ yahoogroups. com, " Nicholas Zakas " <nzakas@...>
              wrote:

              >
              > Hi Bernd,
              >
              >
              >
              > There's no way to add multiple Test Cases in different pages to the same
              > Test Suite. There is, however, a way to run multiple pages of tests one
              > after the other. It's not documented mostly because it's a bit hacky and
              > I haven't had the time to build it out appropriately, but it is
              > functional. The object is called TestManager. Rather than explaining how
              > to use it, it's probably easier to look at an example
              >
              >
              >
              > If you look in the YUI zip file, there is a tests directory. The
              > YUI.html file uses the TestManager to run tests on a series of pages.
              > Each page is only responsible for telling the main page that it's ready
              > to be executed. Each of the other HTML files in that directory can be
              > run either as a standalone page or as part of the YUI.html page. I'd
              > recommend taking a look at both the YUI.html file and one of the simpler
              > unit test files such as profiler.html for a good example of how to set
              > this up.
              >
              >
              >
              > -Nicholas
              >

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