Diff for "JavaScriptIntegrationTesting"

Not logged in - Log In / Register

Differences between revisions 6 and 7
Revision 6 as of 2011-04-06 11:12:03
Size: 1718
Editor: danilo
Comment: Add a link to JavascriptUnitTesting page.
Revision 7 as of 2011-09-23 13:52:38
Size: 1754
Editor: gary
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
Launchpad's JavaScript testing consists of unit tests built with [[http://developer.yahoo.com/yui/3/|YUI 3's]] [[http://developer.yahoo.com/yui/3/yuitest/|yuitest]] library, and automated acceptance testing using the [[Windmill]] framework. We use the GradedBrowserSupport chart to determine which browsers code should be regularly tested in. Launchpad's JavaScript testing consists of unit tests built with [[http://developer.yahoo.com/yui/3/|YUI 3's]] [[http://developer.yahoo.com/yui/3/yuitest/|yuitest]] library. We use the GradedBrowserSupport chart to determine which browsers code should be regularly tested in.
Line 9: Line 9:
 * [[Windmill]]: Critical functions in Launchpad that have been enhanced by JavaScript, like editing a bug title, are tested using Windmill.  * Critical functions in Launchpad that have been enhanced by JavaScript are tested with YUI and a live appserver. See standard_yuixhr_test_template.js and standard_yuixhr_test_template.py in the root of the Launchpad tree for how to do this.

Testing JavaScript

Launchpad's JavaScript testing consists of unit tests built with YUI 3's yuitest library. We use the GradedBrowserSupport chart to determine which browsers code should be regularly tested in.

Testing Launchpad

  • Critical functions in Launchpad that have been enhanced by JavaScript are tested with YUI and a live appserver. See standard_yuixhr_test_template.js and standard_yuixhr_test_template.py in the root of the Launchpad tree for how to do this.

  • Unit testing

Testing the lazr-js Widget Library

Launchpad makes use of the lazr-js widget library, as well as YUI. The Launchpad Windmill tests exercise critical functionality, leaving the comprehensive testing to the lazr-js library itself.

Running the lazr-js unit tests

The unit tests can be run stand-alone from the lazr-js project.

To run the lazr-js test suite:

  1. Grab a copy of the lazr-js trunk:  bzr get lp:lazr-js 

  2. Change to the tests/ directory of the component you want to test. For example, $ cd src/inlineeditor/tests/.

  3. Load any HTML files you find into your browser. The test suite will run automatically.
    • This process is really onerous - maybe the YUI 2 TestManager offers a better way to handle this. -- mars 2009-02-26 15:43:40

Acceptance testing lazr-js widgets

You can try out stand-alone versions of the lazr-js widgets using the examples/ pages. E.g.:

$ firefox examples/inlineedit/index.html


CategoryJavaScript CategoryTesting

JavaScriptIntegrationTesting (last edited 2011-12-21 20:34:00 by bac)