Confirmed users
3,816
edits
(New page: Integrating existing AJAX test suites into our [http://developer.mozilla.org/en/docs/Mochitest Mochitest] infrastructure is critically important to ensure that our development doesn't brea...) |
No edit summary |
||
| Line 10: | Line 10: | ||
=== Notable Notes === | === Notable Notes === | ||
* The "tests" that are loaded through the manifest.json file need to be HTML pages. This can be done for javascript tests like the Prototype tests by creating simple HTML pages that load those javascripts into an iframe. As an example, check out [this one]. | * The "tests" that are loaded through the manifest.json file need to be HTML pages. This can be done for javascript tests like the Prototype tests by creating simple HTML pages that load those javascripts into an iframe. As an example, check out [[QA/TDAI/Projects/Test_Suite_Integration/Example|this one]]. | ||
* Run the tests first outside of Mochikit. This way you have a good idea of what will fail and what will pass. | * Run the tests first outside of Mochikit. This way you have a good idea of what will fail and what will pass. | ||
* Ensure that you import the entire directory structure the Test Suite | * Ensure that you import the entire directory structure the Test Suite uses, so that relative links inside the tests work. | ||
* There is a general page on doing this work (thought it seems a little dated) [http://developer.mozilla.org/en/docs/Add_AJAX_Tests_To_Mozilla here]. | |||
* You can see how the Prototype library was added [http://ejohn.org/blog/testing-prototype-with-firefox-3/ here]. | |||
== So what do I do == | |||
# Download the test suite | |||
# Run it in Firefox 3 | |||
# Understand what the test files are, hopefully they are HTML | |||
# Wrap the mochitest structure around those files (the manifest.json, the controlling HTML file etc) | |||
# Add makefiles to each directory that adds each file in that directory to _TEST_FILES variable and uses a libs target to copy them out to the mochitest location in the object dir. There are sample [http://mxr.mozilla.org/mozilla/source/dom/tests/mochitest/ajax/scriptaculous/test/unit/Makefile.in makefiles] throughout the tree. | |||
# Wrap all of this effort into a patch and attach it to a bug in bugzilla. | |||