Testing your code is important! Before you can even get your code committed into the source tree, you have to test it, and larger patches have to have automated tests. These articles will help you master (and continue to excel at) testing Mozilla code.

ASan Nightly Project
The ASan Nightly Project involves building a Firefox Nightly browser with the popular AddressSanitizer tool and enhancing it with remote crash reporting capabilities for any errors detected.
Clang static analysis
This document is split in two parts. The first part will focus on the modern and robust way of static-analysis and the second part will present the build-time static-analysis.
Debugging Mozilla with Valgrind
This page describes how to use Valgrind (specifically, its Memcheck tool) to find memory errors.
Firefox and Address Sanitizer
Address Sanitizer (ASan) is a fast memory error detector that detects use-after-free and out-of-bound bugs in C/C++ programs. It uses a compile-time instrumentation to check all reads and writes during the execution. In addition, the runtime part replaces the malloc and free functions to check dynamically allocated memory. More information on how ASan works can be found on the Address Sanitizer wiki.
Fuzzing Interface
The fuzzing interface is glue code living in mozilla-central in order to make it easier for developers and security researchers to test C/C++ code with either libFuzzer or afl-fuzz.
Measuring Code Coverage on Firefox
Code coverage essentially is about measuring how often certain lines are hit, branches taken or conditions met in a program, given some test that you run on it. There are different types of coverage metrics (see also the Wikipedia entry), but when we speak of code coverage here, we usually mean line and branch coverage. This type of coverage is only concerned with hit counts for lines and branches.
The Valgrind Test Job
The Valgrind test job builds the browser and runs it under Valgrind, which can detect various common memory-related errors.  This job only runs on Linux64, which is the platform best suited to running Valgrind.

Document Tags and Contributors

Contributors to this page: hellosct1, Sheppy
Last updated by: hellosct1,