Skip to content

Add test coverage improvement plan document#11

Open
dillonvargo wants to merge 1 commit into
masterfrom
devin/1770901180-test-coverage-plan
Open

Add test coverage improvement plan document#11
dillonvargo wants to merge 1 commit into
masterfrom
devin/1770901180-test-coverage-plan

Conversation

@dillonvargo

Copy link
Copy Markdown
Owner

Description of what I changed

Added TEST_COVERAGE_IMPROVEMENT_PLAN.md — a documentation-only file that outlines a structured, phased approach to improving test coverage across openmrs-core. The document covers:

  • Current coverage infrastructure (JaCoCo, Coveralls, SonarCloud) and test profiles
  • A service-level and DAO-level audit identifying classes with no dedicated test files (e.g., ConditionService, DiagnosisService, SerializationService, and 9 Hibernate DAO classes)
  • Action items for the known AOP coverage gap (TRUNK-5151) where BaseVoidHandler masks coverage of void*/retire* methods
  • Recommendations for expanding integration tests (module lifecycle, database migrations, cross-service workflows)
  • Instructions for leveraging existing tooling (JaCoCo reports, SonarCloud, Coveralls)
  • A 6-phase prioritized implementation plan with timeline estimates
  • Concrete code examples following project conventions (JUnit 5, naming rules, Mockito patterns)

No functional code changes — this is documentation only.

Issue I worked on

see https://issues.openmrs.org/browse/TRUNK-5151 (partially — the AOP coverage gap is one of several items addressed in this plan)

Checklist: I completed these to help reviewers :)

  • My IDE is configured to follow the code style of this project.
  • I have added tests to cover my changes. (If you refactored existing code that was well tested you do not have to add tests)
    • N/A — documentation only, no code changes
  • I ran mvn clean package right before creating this pull request and added all formatting changes to my commit.
    • N/A — no Java changes
  • All new and existing tests passed.
  • My pull request is based on the latest changes of the master branch.

Items for Reviewer Attention

  1. Verify gap analysis accuracy: The tables in sections 2.4 claim ConditionService, DiagnosisService, and SerializationService have no test files, and that 9 DAO classes are untested. These were determined by directory listing — please confirm no tests exist under alternate names or locations.
  2. AOP bypass recommendation (section 3.1): The suggested approach of using @InjectMocks on PersonServiceImpl to bypass AOP should be validated — the void logic may live entirely in the AOP handler rather than the method body, which would change the testing strategy.
  3. Line number references will drift: The document references specific pom.xml and source file line numbers that will become stale over time. Consider whether these references add enough value to justify maintenance.
  4. Prioritization: Phase ordering and P0/P1/P2 assignments are subjective — review whether these align with the project's actual priorities.

Link to Devin run: https://app.devin.ai/sessions/daeb89e4ebe64b078ac5575befeb4e41
Requested by: Dillon Vargo

Co-Authored-By: Dillon Vargo <dillonvargo@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant