MailNews:Xpcshell tests: Difference between revisions

Jump to navigation Jump to search
→‎xpcshell tests within MailNews: Add info about abSetup.js and abCleanup.js
(First version)
 
(→‎xpcshell tests within MailNews: Add info about abSetup.js and abCleanup.js)
Line 12: Line 12:
* [http://mxr.mozilla.org/seamonkey/find?text=&kind=text&string=%2Fmailnews%2F.*test_.* existing tests] and also the various support frameworks that have been written:
* [http://mxr.mozilla.org/seamonkey/find?text=&kind=text&string=%2Fmailnews%2F.*test_.* existing tests] and also the various support frameworks that have been written:


* [http://mxr.mozilla.org/seamonkey/source/mailnews/test/resources/mailDirService.js mailDirService.js] provides:
* [http://mxr.mozilla.org/seamonkey/source/mailnews/test/resources/mailDirService.js mailDirService.js]
** Provides: an nsIDirectoryServiceProvider implementation which ensures that the user "profile" directory is defined for xpcshell test implementations.
** Provides: an nsIDirectoryServiceProvider implementation which ensures that the user "profile" directory is defined for xpcshell test implementations.
** "Profile" Directory exists in the directory of the executable, it is called "mailtest"
** "Profile" Directory exists in the directory of the executable, it is called "mailtest"
** Can be imported via [http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/compose/test/unit/test_nsMsgCompose1.js&rev=1.4&mark=6 do_import_script]
** Can be imported via [http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/compose/test/unit/test_nsMsgCompose1.js&rev=1.4&mark=6 do_import_script]
** Should be used to provide a profile directory for all MailNews tests.
** Should be used to provide a profile directory for all MailNews tests.
* [http://mxr.mozilla.org/seamonkey/source/mailnews/addrbook/test/resources/abSetup.js abSetup.js]
** Provides: Initial setup information for the default address books
* [http://mxr.mozilla.org/seamonkey/source/mailnews/addrbook/test/resources/abCleanup.js abCleanup.js]
** Provides: cleanup() function used to correctly close down all address books and remove the created files.
** Notes: release temporary variables before this function so that the garbage collector can clean up nicely (otherwise windows tests may break).


== xpcshell test reporting ==
== xpcshell test reporting ==
canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,627

edits

Navigation menu