-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add aggregate test coverage collection of gax within the showc…
…ase and gax modules (#1430) * chore: add aggregate test coverage collection for showcase and gax
- Loading branch information
Showing
6 changed files
with
208 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Coverage Report | ||
|
||
This module gathers aggregated jacoco test coverage metrics across the `gax-java` and `showcase` modules. The purpose of | ||
the metrics is to provide insights into how much of GAX code is being exercised by showcase and GAX tests and where | ||
(unit tests versus integration tests). They will also provide information on any change in coverage observed | ||
as showcase tests continue to be added to the repository. | ||
|
||
### Unit Test Coverage | ||
In order to view aggregate unit test coverage of GAX in both `gax-java` and `showcase`: | ||
|
||
1. At the root of the repository, run `mvn clean test -DenableTestCoverage`. | ||
2. The metrics can be found at `gapic-generator-java/coverage-report/target/site/jacoco-aggregate/index.html` | ||
|
||
![Screenshot 2023-03-03 at 6 32 50 PM](https://user-images.githubusercontent.com/66699525/222854612-787b4dde-f9a3-469a-8227-8f46dc0a4a20.png) | ||
|
||
### Integration Test Coverage | ||
|
||
In order to view aggregate integration test coverage of GAX in both `gax-java` and `showcase`: | ||
|
||
1. At the root of the repository, run `mvn clean verify -DskipUnitTests -DenableTestCoverage -Penable-integration-tests`. | ||
2. The metrics can be found at `gapic-generator-java/coverage-report/target/site/jacoco-aggregate/index.html` | ||
|
||
![Screenshot 2023-03-03 at 6 36 26 PM](https://user-images.githubusercontent.com/66699525/222854973-f8a96f01-abc1-4e6b-9ab8-99b5e50dec6a.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.google.cloud</groupId> | ||
<artifactId>coverage-report</artifactId> | ||
<packaging>pom</packaging> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<name>Jacoco Aggregrate Test Coverage Report</name> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<checkstyle.skip>true</checkstyle.skip> | ||
<clirr.skip>true</clirr.skip> | ||
<enforcer.skip>true</enforcer.skip> | ||
<maven.compiler.release>8</maven.compiler.release> | ||
<fmt.skip>true</fmt.skip> | ||
<sonar.coverage.jacoco.xmlReportPaths> | ||
${project.basedir}/coverage-report/target/site/ | ||
jacoco-aggregate/jacoco.xml | ||
</sonar.coverage.jacoco.xmlReportPaths> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.cloud</groupId> | ||
<artifactId>gapic-showcase</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.api</groupId> | ||
<artifactId>gax</artifactId> | ||
<version>2.23.3-SNAPSHOT</version> <!-- {x-version-update:gax:current} --> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.api</groupId> | ||
<artifactId>gax-grpc</artifactId> | ||
<version>2.23.3-SNAPSHOT</version> <!-- {x-version-update:gax:current} --> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.api</groupId> | ||
<artifactId>gax-httpjson</artifactId> | ||
<version>0.108.3-SNAPSHOT</version> <!-- {x-version-update:gax:current} --> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
<version>0.8.8</version> | ||
<executions> | ||
<execution> | ||
<id>unit-tests-report-aggregate</id> | ||
<goals> | ||
<goal>report-aggregate</goal> | ||
</goals> | ||
<phase>test</phase> | ||
</execution> | ||
<execution> | ||
<id>integration-tests-report-aggregate</id> | ||
<goals> | ||
<goal>report-aggregate</goal> | ||
</goals> | ||
<phase>integration-test</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.coveo</groupId> | ||
<artifactId>fmt-maven-plugin</artifactId> | ||
<version>2.9</version> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters