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

Add Test Coverage Report and Enforcement #528

Open
4 of 7 tasks
1fanwang opened this issue Sep 13, 2024 · 1 comment · May be fixed by #529
Open
4 of 7 tasks

Add Test Coverage Report and Enforcement #528

1fanwang opened this issue Sep 13, 2024 · 1 comment · May be fixed by #529
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@1fanwang
Copy link
Collaborator

1fanwang commented Sep 13, 2024

Overview

We need to add test coverage reporting and enforcement to our build process. This will help us maintain and improve code quality by ensuring adequate test coverage across the project.

Goals

  • Integrate JaCoCo with our Gradle build
  • Generate comprehensive test coverage reports
  • Enforce minimum coverage thresholds
  • Make reports easily accessible to developers

Implementation Details

  1. Add JaCoCo plugin to root build.gradle file
  2. Configure JaCoCo for all subprojects
  3. Set up aggregate report generation
  4. Define coverage thresholds (suggest starting with 70% instruction coverage)
  5. Integrate coverage checks into our CI/CD pipeline

Specific Tasks

  • Update root build.gradle to include JaCoCo configuration
  • Create a jacocoTestReport task for each subproject
  • Create a jacocoRootReport task for aggregate reporting
  • Set up jacocoTestCoverageVerification with appropriate rules
  • Update CI configuration to run coverage checks and fail builds if thresholds aren't met
  • Determine how/where to publish reports (e.g., as build artifacts)
  • Update documentation to explain how to run and interpret coverage reports

Next Steps

  1. Review and adjust proposed implementation details
  2. Assign developer(s) to the task
  3. Plan for gradual increase of coverage thresholds over time

Additional Notes

  • We should consider excluding certain packages or classes if they're not suitable for unit testing
  • We should discuss strategies for rolling this out without disrupting development (e.g., setting specific coverage requirement per module instead of global)

Resources

@1fanwang
Copy link
Collaborator Author

@1fanwang 1fanwang added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Sep 13, 2024
@1fanwang 1fanwang linked a pull request Sep 14, 2024 that will close this issue
@1fanwang 1fanwang self-assigned this Sep 14, 2024
@1fanwang 1fanwang changed the title [Proposal] Add Test Coverage Report and Enforcement Add Test Coverage Report and Enforcement Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant