The Chromium Chronicle #3: Code Coverage in Gerrit
Episode 3: by Yuke, Roberto and Sajjad in Mountain View, CA (June, 2019)
Tests are critical because they find bugs and regressions, enforce better designs and make code easier to maintain. Code coverage helps you ensure your tests are thorough.
Chromium CLs can show a line-by-line breakdown of test coverage. You can use the code coverage trybot to ensure you only submit well-tested code.
To see code coverage for a Chromium CL, trigger the code coverage trybot linux-coverage-rel:
Once the build finishes and code coverage data is processed successfully, look at the right column of the side by side diff view to see coverage information:
The code coverage tool currently supports C/C++ code for Chrome on Linux; support for more platforms and more languages is in progress.
The code coverage trybot has been rolled out to a 10% experiment, and once we're more comfortable in its stability, we plan to enable it by default and expand it to more platforms.
Learn More #
Share your feedback #
Have any feedback? Contact firstname.lastname@example.org or file a bug.