xref: /aosp_15_r20/external/sdk-platform-java/coverage-report/README.md (revision 882aa7c72c3cd3b66e72a261bdd69b93f7de7670)
1*882aa7c7SMatt Gilbride## Coverage Report
2*882aa7c7SMatt Gilbride
3*882aa7c7SMatt GilbrideThis module gathers aggregated jacoco test coverage metrics across the `api-common`, `gax-java` and `showcase` modules. The purpose of
4*882aa7c7SMatt Gilbridethe metrics is to provide insights into how much of api-common and GAX code is being exercised by showcase, GAX and api-common tests and where
5*882aa7c7SMatt Gilbride(unit tests versus integration tests). They will also assist with tracking any changes in coverage as showcase tests continue to be added to the repository.
6*882aa7c7SMatt Gilbride
7*882aa7c7SMatt Gilbride### Unit Test Coverage
8*882aa7c7SMatt GilbrideIn order to view aggregate unit test coverage of api-common and GAX in `api-common`, `gax-java` and `showcase`:
9*882aa7c7SMatt Gilbride
10*882aa7c7SMatt Gilbride1. At the root of the repository, run `mvn clean test -DenableShowcaseTestCoverage`.
11*882aa7c7SMatt Gilbride2. The metrics can be found at `gapic-generator-java/coverage-report/target/site/jacoco-aggregate/index.html`
12*882aa7c7SMatt Gilbride
13*882aa7c7SMatt Gilbride![Screenshot 2023-03-23 at 4 29 36 PM](https://user-images.githubusercontent.com/66699525/227346653-b50ec440-71f9-49f4-be21-3976c7f995c7.png)
14*882aa7c7SMatt Gilbride
15*882aa7c7SMatt Gilbride### Integration Test Coverage
16*882aa7c7SMatt Gilbride
17*882aa7c7SMatt GilbrideIn order to view aggregate integration test coverage of api-common and GAX in `api-common`, `gax-java` and `showcase`:
18*882aa7c7SMatt Gilbride
19*882aa7c7SMatt Gilbride1. At the root of the repository, run `mvn clean verify -DskipUnitTests -DenableShowcaseTestCoverage -Penable-integration-tests`.
20*882aa7c7SMatt Gilbride2. The metrics can be found at `gapic-generator-java/coverage-report/target/site/jacoco-aggregate/index.html`
21*882aa7c7SMatt Gilbride
22*882aa7c7SMatt Gilbride![Screenshot 2023-03-23 at 4 33 11 PM](https://user-images.githubusercontent.com/66699525/227348487-f1ba2bb8-7577-4280-a1a1-7aa78e242f12.png)