Project Title : Enhancing Component Test Coverage and Quality for OpenMRS3
Primary Mentor : @piumal1999
Backup Mentor: @anjisvj
Student: @ayushmishra
Project Link: GSoC 2023: Enhancing component test coverage and quality for OpenMRS3
Overview
The main aim of the project was to improve the overall code quality of OpenMRS3 by enhancing the component test coverage. It was mainly focused on esm-patient-management repo. Good code coverage will ensure that the software is working as intended and prevent the bugs by detecting them earlier in the software development lifecycle. I have worked on patient-management repo and increased the coverage from 40% to 72%. We can work further to improve the coverage on this repo and then we can move to other repos like esm-patient-chart etc.
Initial Test Coverage
Current Test Coverage
Objectives
Improve the existing test of the patient-management-repo - completed
Write new test for the patient-management-repo - completed
Improve the code coverage for patient-management repo - completed
Improve the code coverage for patient-chart-repo - removed
Contributions
I primarily worked on the patient management repo
Microfrontends for the management of patients (appointments, patient lists, patient search, registration, and service queues). - GitHub - openmrs/openmrs-esm-patient-management: Microfrontends for ...
Issues
https://issues.openmrs.org/browse/O3-2063
https://issues.openmrs.org/browse/O3-2214
https://issues.openmrs.org/browse/O3-2288
https://issues.openmrs.org/browse/O3-2328
https://issues.openmrs.org/browse/O3-2329
Pull Request
(fix) O3-2062: updated unit tests for autosuggest component by ayush-AI · Pull Request #667 · openmrs/openmrs-esm-patient-management · GitHub merged
(fix) O3-2064: updated the unit test for input component by ayush-AI · Pull Request #672 · openmrs/openmrs-esm-patient-management · GitHub merged
(fix) O3-2071: improved coverage for select-input component by ayush-AI · Pull Request #678 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) O3-2073: Improve test coverage for the `DeathInfoSection` component by ayush-AI · Pull Request #680 · openmrs/openmrs-esm-patient-management · GitHub merged
(fix) O3-2079: Remove the estimated-age-input component by ayush-AI · Pull Request #690 · openmrs/openmrs-esm-patient-management · GitHub merged
(fix) O3-2080: Remove the unidentified-patient-input component by ayush-AI · Pull Request #691 · openmrs/openmrs-esm-patient-management · GitHub merged
(fix) O3-2081- Update tests for patient-registration-validation component by ayush-AI · Pull Request #707 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) O3-2081: Fix tests for the `PatientRegistration` component by ayush-AI · Pull Request #709 · openmrs/openmrs-esm-patient-management · GitHub merged
(test)O3-2215: Add tests for field.component by ayush-AI · Pull Request #741 · openmrs/openmrs-esm-patient-management · GitHub merged
https://github.com/openmrs/openmrs-esm-patient-management/pull/747 merged
(test) O3-2218 O3-2219: Add test for `add-patient-link` and `nav-link tests` components by ayush-AI · Pull Request #749 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) O3-2225 O3-2226: Add tests for cancel-patient-edit.component and delete-identifier-confirmation-modal by ayush-AI · Pull Request #750 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) O3-2227 & O3-2228: Add Test for `display-photo.component.tsx` and `edit-patient-details-button.component` by ayush-AI · Pull Request #751 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) O3-2222: Add tests for `person-attribute-field.component.tsx` component by ayush-AI · Pull Request #760 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) O3-2283: Add test for `coded-person-attribute-field.component.tsx` by ayush-AI · Pull Request #762 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) O3-2224: add tests for `text-person-attribute-field.component.tsx` by ayush-AI · Pull Request #766 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) O3-2286: Add tests for `relationship-section.component.tsx` by ayush-AI · Pull Request #767 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) O3-2289: Add test for `active-visits.component.tsx` by ayush-AI · Pull Request #770 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) O3-2297: Add tests for `visit-detail.component.tsx` by ayush-AI · Pull Request #771 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) O3-2292: add tests for `encounter-observations.component.tsx` by ayush-AI · Pull Request #772 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Adds test for `patient-search-bar.component.tsx` by ayush-AI · Pull Request #777 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Adds test for `patient-search-button.component.tsx` by ayush-AI · Pull Request #778 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): adds test for `contact-details.component.tsx` by ayush-AI · Pull Request #779 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): adds test for `patient-search-page.component.tsx` by ayush-AI · Pull Request #780 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): adds test for `patient-search-icon.component.tsx` by ayush-AI · Pull Request #781 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Add tests for `compact-patient-banner.component.tsx` by ayush-AI · Pull Request #782 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Add tests for `patient-search.component.tsx` by ayush-AI · Pull Request #783 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Add tests for `recent-patient-search.component.tsx` by ayush-AI · Pull Request #784 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Add tests for `compact-patient-search.component.tsx` by ayush-AI · Pull Request #785 · openmrs/openmrs-esm-patient-management · GitHub merged
(test) Add tests for `add-patient-to-patient-list-menu-item.component.tsx` by ayush-AI · Pull Request #787 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Add test for `overlay.component.tsx` by ayush-AI · Pull Request #788 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Add test for `patient-list-action-button.test.tsx` by ayush-AI · Pull Request #789 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Add test for `patient-list-detail.component.tsx` by ayush-AI · Pull Request #790 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Add test for `patient-list-list.component.tsx` by ayush-AI · Pull Request #791 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Add test for `patient-table.component.tsx` by ayush-AI · Pull Request #793 · openmrs/openmrs-esm-patient-management · GitHub merged
(test): Add test for `root.component.tsx` of esm-patient-list-app by ayush-AI · Pull Request #794 · openmrs/openmrs-esm-patient-management · GitHub merged
https://github.com/openmrs/openmrs-esm-patient-management/pull/796 merged
https://github.com/openmrs/openmrs-esm-patient-management/pull/797 merged
https://github.com/openmrs/openmrs-esm-patient-management/pull/748 InReview
https://github.com/openmrs/openmrs-esm-patient-management/pull/786 InReview
https://github.com/openmrs/openmrs-esm-patient-management/pull/792 InReview
https://github.com/openmrs/openmrs-esm-patient-management/pull/732 DraftPR
Blog Post
Greetings, everyone!
Reading time: 3 min read
Greetings Everyone,
Reading time: 1 min read
Hello everyone,
Reading time: 2 min read
Hello Everyone,
Reading time: 3 min read
Hello Everyone,
Reading time: 2 min read
https://medium.com/@ayushmishra2854/week-08-gsoc-23-with-openmrs-9daee5c48198
https://medium.com/@ayushmishra2854/week-09-gsoc-23-with-openmrs-d482b3d6557e
https://medium.com/@ayushmishra2854/week-10-gsoc-23-with-openmrs-65a07120f0a0
https://medium.com/@ayushmishra2854/week-11-gsoc-23-with-openmrs-bd381c454972
https://medium.com/@ayushmishra2854/week-12-gsoc-23-with-openmrs-e9ca87973bdc
Video Presentation
https://youtu.be/28WLlu3Wvzg
Talk Thread
https://talk.openmrs.org/t/gsoc-2023-enhancing-component-test-coverage-and-quality-for-openmrs3-project-updates-and-discussions/39691/1
Resources
Project Proposal
Project Wiki
Future Work:
While significant improvements have been made in the test coverage we can continue writing test for uncovered scenarios and components. We can move our focus to other repos as well like patient-chart etc. Further more we can do other type of testing like performance testing, load testing etc.
Thought on the GSoC
Participating in Google Summer of Code (GSoC) has been an enriching journey that has significantly enhanced my skills and understanding of open-source development. Over the course of the program, I had the privilege to work on a critical project aimed at elevating the component test coverage and overall quality of OpenMRS3. This project has helped me in understanding the bits of the whole O3 project and developed a base for my further contributions.
I want to thank my mentors Piumal and Anjula for their support and guidance. Also I would like to thank the whole OpenMRS community for giving this opportunity. I am really grateful to be a part of such an awesome community.