The Review Process
Thursday, August 6th, 2009 @ 16:15 by whimboo![]()
![]()
Before your test can be checked into the mozmill-test repository you have to pass the review process. The reviewer has to learn about the test and check if everything is done correctly. In order to make the review a littler easier, take a look at the "Writing Tests" chapter and check your test script abides by the guidelines located there first. Besides checking the syntax and code style of the test, make sure the test runs in the IDE and via the command line client before requesting a review. If questions arise feel free to ask in #qa or the Mozmill development mailing list at any time.
Simplified Patch Creation
The easiest way to create a patch is by using the 'hg diff' command bounded by two other commands. With 'hg add' you advice Mercurial to track your test. It's needed to see your test content in the diff output. Once the patch has been created you can use 'hg rm' to safely remove the test from the tracking list. That will guarantee that no conflicts will happen when you pull a new version to your local copy of the repository. See the following example:
Imagine you have created a test called "testZoomSettings.js" which is saved under "firefox/testLayout" and you want to create a patch called "patch_file":
$ hg add firefox/testLayout/testZoomSettings.js
$ hg diff >patch_file
$ hg rm -f firefox/testLayout/testZoomSettings.js
After you ran those commands you will find the file patch_file in the current folder which can be uploaded as attachment to the bug report.
Advanced Patch Creation
As you can imagine it will be hard to track all the files when you are working on several tests in parallel. Because all those files will lingering around in your working copy. To prevent that and to gain the overview you can use the Mercurial Queue extension. Read https://developer.mozilla.org/en/Mercurial_Queues to get familiar with the procedure.
In the example below you can see how it will work starting with a new test:
$ vi firefox/testLayout/testZoomSetting.js
$ hg qnew zoomsettings
$ hg add firefox/testLayout/testZoomSettings.js
$ hg diff
$ hg qrefresh
$ vi firefox/testLayout/testZoomSetting.js
$ hg diff
$ hg qdiff
$ hg qpop
$ hg qpush
Asking for Review
All existing patches are located under .hg/patches. Before you ask for a review you should check the patch that it is valid. You can use the online review tool. There should be listed only comments which claims that lines are too long.
Reviews are managed in Bugzilla. So a new bug report for this particular test has to be created (see bug 479720 as example). The new bug should be filed in the product and component your test is executed against (e.g. if you write a security test use Firefox/Security). Also add the URL of the Litmus testcase to the URL field of the bug which will give us a reference the verify the Mozmill test. Finally your test has to be attached to the bug. Now you can request review from Aakash Desai (adesai@mozilla.com) or Henrik Skupin (hskupin@gmail.com).