canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,628
edits
(→Pre-defined profile: Add IMAP & NNTP to future profile requirements.) |
(Add information on how to manually run the tests.) |
||
| Line 17: | Line 17: | ||
== Method == | == Method == | ||
The first version of the test files have been posted in {{bug|427980}}. | |||
Initial Method: | Initial Method: | ||
| Line 24: | Line 26: | ||
*# Startup Main Mail Window | *# Startup Main Mail Window | ||
*# Open Address Book Window, close Address Book Window | *# Open Address Book Window, close Address Book Window | ||
*# Close Main Mail Window | *# Close Main Mail Window | ||
To be added at a later stage: | To be added at a later stage: | ||
* Open and close of Message Composition Window. | |||
* Large Message folders and selection thereof. | * Large Message folders and selection thereof. | ||
* Large Address Books. | * Large Address Books. | ||
| Line 45: | Line 47: | ||
* Mail A | * Mail A | ||
** Allocations - number of calls to malloc and friends. | ** Allocations - number of calls to malloc and friends. | ||
== Manually Running Tests == | |||
TODO: Document how to set up the profile. | |||
=== Setting up === | |||
''Note until the patches on {{bug|427980}} are checked in, this process won't work without the patches being manually applied.'' | |||
# Build Thunderbird or SeaMonkey trunk with your standard mozconfig file, but with the following options set: | |||
#* mk_add_options MOZ_CO_MODULE="mozilla/tools/trace-malloc mozilla/testing/mailnews" | |||
#* ac_add_options --enable-debug | |||
#* ac_add_options --enable-trace-malloc | |||
# Copy the following two files in <objdir>/dist/bin/chrome of your build: | |||
#* mozilla/testing/mailnews/bloat/bloatTestOverlay.js | |||
#* mozilla/testing/mailnews/bloat/bloatTestOverlay.xul | |||
# Create a text file called "mailnewstest.manifest" in the <objdir>/dist/bin/chrome directory of your build. | |||
# Fill the text file with the following (replacing the /path/to/objdir with the correct path): | |||
<pre> | |||
content mailnewstest file:////path/to/objdir/dist/bin/chrome/ | |||
overlay chrome://messenger/content/messenger.xul chrome://mailnewstest/content/bloatTestOverlay.xul | |||
overlay chrome://messenger/content/addressbook/addressbook.xul chrome://mailnewstest/content/bloatTestOverlay.xul | |||
overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://mailnewstest/content/bloatTestOverlay.xul | |||
</pre> | |||
You will now be able to run SeaMonkey or Thunderbird from the object directory and the automation suite will run (but you won't get the leak or bloat output). | |||
=== Reference Count Leak Test === | |||
# set XPCOM_MEM_BLOAT_LOG to 1 in your environment (see also [http://developer.mozilla.org/en/docs/Debugging_memory_leaks Debugging Memory Leaks]) | |||
# Start the appropriate executable. | |||
# Once the test is completed (application automatically shuts down), you'll get a dump of the objects allocated and which ones are leaking. | |||
=== Leak, Max Heap and Allocations Test === | |||
# Start the appropriate executable with the following arguments: | |||
#* --trace-malloc malloc.log | |||
#* --shutdown-leaks sdleak.log | |||
# Wait for the test to complete and the application to shut down. | |||
# The malloc.log file can then be run through leakstats in the <objdir>/tools/trace-malloc/ directory to obtain the statistics: | |||
#* leakstats malloc.log | |||
See [http://developer.mozilla.org/en/docs/Debugging_memory_leaks Debugging Memory Leaks] for more information on what to do with this data. | |||
== Code Locations == | == Code Locations == | ||