Bug 1879146 - Move mozac.org docs back into the android-components folder. r=owlish...
[gecko.git] / mobile / android / android-components / docs / contribute / code_coverage.md
blob3a3eb6f540859b0b675051003a3232b6732471dd
1 ---
2 layout: page
3 title: Code coverage
4 permalink: /contributing/code-coverage
5 ---
7 # Code Coverage
9 > In computer science, test coverage is a measure used to describe the degree to which the source code of a program is executed when a particular test suite runs. A program with high test coverage, measured as a percentage, has had more of its source code executed during testing, which suggests it has a lower chance of containing undetected software bugs compared to a program with low test coverage. ([Wikipedia](https://en.wikipedia.org/wiki/Code_coverage))
11 # Automated reports
13 For pull requests and main pushes we generate code coverage reports on taskcluster and they can be accessed via the GitHub checks.
15 # Generating reports locally
17 Locally you can generate a coverage report for a module with the following command:
18 ```bash
19 ./gradlew -Pcoverage <module>:build
20 ```
22 After that you'll find an HTML report at the following location:
23 ```
24 components/<path to module>/build/reports/jacoco/jacocoTestReport/html/index.html
25 ```