Merge lp:~sinzui/launchpad/auto-yui-tests into lp:launchpad
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~sinzui/launchpad/auto-yui-tests |
Merge into: | lp:launchpad |
Diff against target: |
238 lines (+126/-16) 6 files modified
configs/testrunner-appserver/yui-unittest.zcml (+16/-0) lib/canonical/launchpad/javascript/registry/tests/test_milestone_table.js (+6/-0) lib/canonical/launchpad/javascript/registry/tests/timeline.js (+12/-0) lib/lp/registry/windmill/tests/test_yuitests.py (+21/-0) lib/lp/testing/__init__.py (+60/-16) lib/lp/testing/views.py (+11/-0) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/auto-yui-tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+22485@code.launchpad.net |
Description of the change
This is my branch to automatically test YUI unit tests in windmill.
The scope of this branch is only for the registry. This solution is not
comprehensive for launchpad, nor does it solve hard problems like
testing in iframes (a requirement for testing timelines and help)
lp:~sinzui/launchpad/auto-yui-tests
Diff size: 186
Launchpad bug: None, this is to unblock the product branch.js feature.
Test command: ./bin/test -vv -t test_yuitests
Pre-
Target release: 10.04
Automatically add YUI unit tests to the test runner
-------
The automated js test runner needs a harness to run the YUI unit test in
canonical/
The following conditions must be met for a test to be automatically played
by windmill.
* It must be lib/canonical/
* The test js inject a node with id="complete" when complete.
* The html file must match test_*.html
* The html cannot test iframes
* To accommodate iframes, the YUI test would need to inject the results
in the parent page. This is work that does not solve the immediate
issue.
Rules
-----
The harness needs to:
* Locate each html file like */javascript/
* Open it in the browser, wait for the log to populate
* Verify there are no fail nodes in the log
* Report failing notes as tests.
QA
--
None for the apps. This is successful if it correctly reports failures.
Lint
----
Linting changed files:
configs/
lib/canonical
lib/lp/
lib/lp/
lib/lp/
Test
----
* lib/canonical/
* Added a method that provides a clear indication to windmill that the
test is complete.
* lib/lp/
* Added a test harness to locate test_*.html in the registry YUI
directory. Note that I renamed test_milestone_
The test waits for the signal that the YUI test runner is complete,
then gets the page content, extracts the messages, and calls fail
if there was a YUI failure.
Implementation
--------------
* configs/
* Register a view that can serve the html pages through the webapp.
This is a requirement because windmill cannot load a file from the
available to the test runner.
* lib/lp/
* Removed a duplicate class. This looks like a paste error.
* lib/lp/
* Create a view to retrieve the yui files that need to play in the
windmill test.
Curtis this branch looks good. As we discussed on IRC it will need to be modified to allow at least lp.code in addition to lp.registry to satisfy the immediate use case.
I look forward to trying it out.