MailNews:Xpcshell tests: Difference between revisions

Jump to navigation Jump to search
(→‎Developing xpcshell tests within MailNews: check-interative bug wrt tail files is no longer relevant)
Line 15: Line 15:
== Developing xpcshell tests within MailNews ==
== Developing xpcshell tests within MailNews ==


When developing new tests it is useful to look at the [http://developer.mozilla.org/en/docs/Writing_xpcshell-based_unit_tests devmo documentation for writing xpcshell-based unit tests]
When developing new tests it is useful to look at the [http://developer.mozilla.org/en/docs/Writing_xpcshell-based_unit_tests devmo documentation for writing xpcshell-based unit tests].


[http://mxr.mozilla.org/seamonkey/find?text=&kind=text&string=%2Fmailnews%2F.*test_.* This list links the existing tests] that are currently within Thunderbird.
[http://mxr.mozilla.org/seamonkey/find?text=&kind=text&string=%2Fmailnews%2F.*test_.* This list links the existing tests] that are currently within Thunderbird.
Line 27: Line 27:
* A global variable "gProfileDir" containing an nsIFile variable with the profile directory to use for the xpcshell tests.
* A global variable "gProfileDir" containing an nsIFile variable with the profile directory to use for the xpcshell tests.
* A nsIDirectoryService that points at the gProfileDir and provides the necessary facilities to use profile-related directories, e.g. NS_GetSystemDirectory("MailD", ...).
* A nsIDirectoryService that points at the gProfileDir and provides the necessary facilities to use profile-related directories, e.g. NS_GetSystemDirectory("MailD", ...).
In addition, the [[MailNews:Fakeserver|fakeserver]] library allows tests to communicate with a variety of different, potentially non-standard servers.


=== Profile Directory Cleanup ===
=== Profile Directory Cleanup ===
192

edits

Navigation menu