Copy mozmill tests to mochitest
Categories
(Thunderbird :: Testing Infrastructure, task)
Tracking
(Not tracked)
People
(Reporter: darktrojan, Assigned: darktrojan)
References
Details
Attachments
(1 file)
974.67 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
This bug is about getting all of the tests into the mochitest suite, not necessarily all passing or even all running. This is mostly a mechanical transformation although I've made some extra changes to get the vast majority of the tests running and passing.
Here's what I've done:
hg copy
'd all of the files frommail/test/mozmill
tomail/test/browser
to preserve as much history as possible- renamed each test file from
test-this-feature.js
tobrowser_thisFeature.js
to match the naming convention - moved support files into their own directory if they didn't already have one
- added a mochitest manifest to each directory, where necessary copying in prefs from
mail/test/mozmill/runtest.py
In the files themselves:
- fixed references to the mozmill JSMs since they won't be available at
chrome://mozmill
any more - wrapped functions named
testFooBar
andsetupModule
inadd_task(…)
- wrapped functions named
teardownModule
inregisterCleanupFunction(…)
- called
setupTest
andteardownTest
from test functions, as mochitest doesn't do this - replaced all instances of
assert_equals
,assert_not_equals
,assert_true
, andassert_false
with theirAssert.foo
equivalent - if a test has none of the above, add a report at the end checking the test ran to completion, so that mochitest stops complaining it did nothing
Once these tests are in the tree and we have enough of them running, we can turn mozmill off and make further improvements. Currently the two suites share the JSMs in mail/test/mozmill/shared-modules
so I want to keep them unchanged as much as possible.
Assignee | ||
Comment 1•5 years ago
|
||
I think it's best if we don't land this until after merge day next week. I'll put up a patch for review now anyway in case somebody has too much coffee and needs some reading material that will bore them to sleep at night.
Assignee | ||
Comment 2•5 years ago
|
||
Here it is, for your "entertainment".
Comment 3•4 years ago
|
||
Comment on attachment 9112223 [details] [diff] [review] 1599991-mozmill-mochitest-1.diff Review of attachment 9112223 [details] [diff] [review]: ----------------------------------------------------------------- rs=mkmelin assumig they pass
Good work there. Good that there are just some tiny syntactical changes needed to make the tests run on mochitest.
I wonder when all this breaks in the future by mochitest assuming too much about being run in a browser, not TB. All that "browser_" naming does add much confidence.
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/825c14a55e12
Copy mozmill tests to mochitest; r=mkmelin
Assignee | ||
Comment 6•4 years ago
|
||
Pushed with some very minor changes to improve the reliability of some tests.
Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/65f427004ab5 follow-up - Set mail.startup.enabledMailCheckOnce to prevent tests trying to check mail at start-up; rs=bustage-fix DONTBUILD
Description
•