Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor SonarCloud showcase test coverage to show meaningful results #2068

Closed
mpeddada1 opened this issue Oct 4, 2023 · 2 comments · Fixed by #2106
Closed

Refactor SonarCloud showcase test coverage to show meaningful results #2068

mpeddada1 opened this issue Oct 4, 2023 · 2 comments · Fixed by #2106
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@mpeddada1
Copy link
Contributor

We have SonarCloud set up to track showcase coverage for both unit tests and integration tests. Integration test coverage can help with determining how much of end-to-end behavior we are testing and also provide more relevant information as showcase ITs are handwritten. On the other hand, the unit tests are generated.

Tracking unit test coverage can sometimes add noise to the PRs. This is particularly relevant when we are upgrading grpc which results in the re-generation of classes that are generated by the gRPC proto compiler (example: #1989). This makes it a little difficult to determine whether the coverage result is actionable or not.

Screenshot 2023-10-04 at 5 50 28 PM

Proposed changes after discussion with @burkedavison to ensure that test coverage results are more meaningful:

  • Remove unit test coverage.
  • Refactor integration test coverage to only include the gapic-showcase/ folder. This will allow us to focus on coverage for code generated by gapic-generator-java.
@mpeddada1 mpeddada1 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern. and removed type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Oct 4, 2023
@JoeWang1127 JoeWang1127 self-assigned this Oct 11, 2023
@JoeWang1127
Copy link
Collaborator

Refactor integration test coverage to only include the gapic-showcase/ folder.

Hi @mpeddada1, do you mean exclude api-common and gax-java when analyzing showcase integration test coverage?

@burkedavison
Copy link
Member

@JoeWang1127 : Showcase integration test coverage currently includes class coverage in:

  • <root>/showcase/gapic-showcase
  • <root>/showcase/grpc-gapic-showcase-v1beta1
  • <root>/showcase/proto-gapic-showcase-v1beta1

This should be modified to only include the classes generated by gapic-generator-java. These are found exclusively in <root>/showcase/gapic-showcase/src/main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants