Confirmed users
2,317
edits
No edit summary |
|||
| Line 6: | Line 6: | ||
Mozilla QA uses Trace Malloc Debug Build to test Firefox Components and Extensions for leaks. One part of this testing is manual testing. You can find the QA Firefox 3 Leak Testing Testplan [http://wiki.mozilla.org/MozillaQualityAssurance:Home_Page:Firefox_3.0_TestPlan:Leaks here]. | Mozilla QA uses Trace Malloc Debug Build to test Firefox Components and Extensions for leaks. One part of this testing is manual testing. You can find the QA Firefox 3 Leak Testing Testplan [http://wiki.mozilla.org/MozillaQualityAssurance:Home_Page:Firefox_3.0_TestPlan:Leaks here]. | ||
Many thanks to David Baron, Jonas Sicking, Jesse Ruderman and Peter Van der Beken for the help on this Project. | |||
== Leak Gauge == | == Leak Gauge == | ||
| Line 17: | Line 19: | ||
=== Using Leak Gauge === | === Using Leak Gauge === | ||
As mentioned before, you don't need to install | As mentioned before, you don't need to install additional software to run Leak Gauge, however some simple steps are needed to run Leak Gauge and to get the Leak Log. | ||
1. Setting up the Environment Variable: | 1. Setting up the Environment Variable: | ||
| Line 58: | Line 60: | ||
to exit; otherwise it will look like everything leaked | to exit; otherwise it will look like everything leaked | ||
* Every time you start Firefox after you have defined the environment variables, your existing leak log will be overwritten. So if you want to reproduce a leak, or when you want to save a leak log, you need to change the | * Every time you start Firefox after you have defined the environment variables, your existing leak log will be overwritten. So if you want to reproduce a leak, or when you want to save a leak log, you need to change the file name (like from leak1.log to leak2.log) next time before you run Firefox. | ||
See also the steps for testing for more Information. | See also the steps for testing for more Information. | ||
| Line 95: | Line 97: | ||
You can also use debug builds for leak testing. Building and Running a Debug Build is more complex then using Leak Gauge. If you interested in running Leak Test Debug Builds you can find [http://wiki.mozilla.org/MozillaQualityAssurance:Home_Page:Firefox_3.0_TestPlan:Leaks:LeakTesting-How-To:Debug_Builds here] more information. | You can also use debug builds for leak testing. Building and Running a Debug Build is more complex then using Leak Gauge. If you interested in running Leak Test Debug Builds you can find [http://wiki.mozilla.org/MozillaQualityAssurance:Home_Page:Firefox_3.0_TestPlan:Leaks:LeakTesting-How-To:Debug_Builds here] more information. | ||
= Leak Testing - | = Leak Testing - Testing steps for Firefox / Firefox Extension Testing = | ||
First of all, its important to have some steps to reproduce, so developers can reproduce this leak and also for verifying a fixed leak bug. So if you can reproduce a memory leak 2 or more times, it should be filed as bug, see ... | |||
Some general Tips for testing Firefox Extensions for Memory Leaks: | |||
* First create a new Firefox Profile to ensure nothing else from a used profile cause a leak. Start your Leak Debug as described. | * First create a new Firefox Profile to ensure nothing else from a used profile cause a leak. Start your Leak Debug as described. | ||
* Install | * Install the Extension and Restart Firefox | ||
* After the Restart - Quit Firefox to make sure the Extension does not leak after installation | * After the Restart - Quit Firefox to make sure the Extension does not leak after installation in general | ||
* When | * Even when no Memory Leak was detected on start, use the features of this the Extension (in example with the QA Extension, use the Chat now button, the Login into Litmus etc) | ||
* Close Firefox and upload the Leak Log [http://mxr.mozilla.org/mozilla/source/tools/footprint/leak-gauge.html here] | |||
* When a memory leak was detected save the leak.log/set the Leak Log environment variable to a different file name and start Firefox again to verify your steps to reproduce. | |||
'''Note:''': '''If the browser crashes during the run, the log is pretty much useless, since many objects will have been allocated but not freed at the time the crash occurs.''' | |||
== How to file a Memory Leak Bug ? == | |||
* When you have found a Memory Leak Bug in Firefox and you have solid steps to reproduce or a testcase, please file a Bug in Bugzilla. | |||
''Note: If you are unsure if you have found a memory leak, or you are not familiar with Bugzilla, you can also ping Tomcat or send a mail to [mailto:tomcat@mozilla.com tomcat@mozilla.com] and we can recheck this leak and file the leak bug'' | |||
* | * When you are unsure if its your extension that leak or Firefox itself, the best component in Bugzilla is Core:General | ||
* Please add '''mlk''' as keyword when you file the bug. | |||
* Please include the steps to reproduce/the testcase to the bug. This help developers to reproduce and fix the bug. | |||
* Please add the leak log / output from the Leak Gauge Script to the Bug. | |||
* It would great if you cc Tomcat to the Bug. You can do this via entering just ''':tomcat''' in the cc field in bugzilla or the full email address '''cbook@mozilla.com''' | |||
== Questions / Feedback == | |||
In Case you need help or when you have questions regarding the leak testing of your extension, feel me to ping me on irc.mozilla.org, my nickname is "Tomcat" or send me an [mailto:tomcat@mozilla.com e-mail]. | |||