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

RE: [ydn-javascript] YUI Profiler and YUI Unit Test

Expand Messages
  • Nicholas Zakas
    Hi Matt, Excellent questions. While I can t offer any step-by-step instructions, I can offer up some advice based on my own experiences. I ve not successfully
    Message 1 of 2 , Feb 29, 2008
    • 0 Attachment

      Hi Matt,

       

      Excellent questions. While I can’t offer any step-by-step instructions, I can offer up some advice based on my own experiences.

       

      I’ve not successfully come up with a way to automate testing, mostly due to the need to test in multiple browsers and on multiple platforms. I’m certainly open to suggestions if anyone else on the list has recommendations.

       

      The way I’ve integrated unit testing is to trigger it using a query string argument on the site. I keep the unit testing code separate from the rest and only load it when the query string is present. That way, you don’t need to worry about having testing code on production.

       

      As for structure, I find that keeping a separate directory for unit tests is helpful. For every JS source file you have, make sure there’s a corresponding test file in the other directory. It makes it easy to account for tests because you know if you add a JS source file, you need to add a JS test file as well.

       

      I don’t know if there are the type of suggestions you’re looking for, but I’d be happy to provide any other insights I can.

       

      -Nicholas

       


      From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of mattibbals
      Sent: Thursday, February 28, 2008 6:05 PM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] YUI Profiler and YUI Unit Test

       

      Hey Everyone -

      I was wondering if anyone has any advice on implementing the YUI
      Profiler and YUI Test for a large project.

      Ideally, any advice on how to perhaps use them with some automated
      testing tools that a QA team might use.

      Some ideas about how to organize the code, running the tests, and
      removing them for a production environment would be greatly appreciated.

      Thanks!

      Matt

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