GSoC 2023: Enhancing Component Test Coverage and Quality for OpenMRS3 Project updates and discussions

Hello Everyone,

I will be working on the project GSoC 2023: Enhancing Component Test Coverage and Quality for OpenMRS3. This project will aim to achieve a high level of test coverage for O3 repos (patient-chart and patient-management will be primary repos) by using consistent and comprehensive unit and integration testing strategy.

The key areas of improvement for this project include:

  1. Test Coverage: By identifying areas of the codebase with insufficient test coverage, we will work towards achieving a higher level of confidence in the quality and stability of the O3 repositories. This will involve writing new tests and enhancing existing ones.
  2. Consistency: A consistent testing strategy ensures that tests are structured uniformly across the codebase. By adhering to established guidelines and best practices, we will create a reliable and predictable testing framework.
  3. Comprehensive Testing: The project aims to cover a wide range of scenarios, including edge cases and potential error conditions, to ensure the robustness of the code. By considering various use cases and testing different aspects of the system, we can provide more comprehensive protection against potential issues.

Mentors

Primary Mentor: @piumal1999

Backup Mentor: @anjisvj

Resources

  1. Project Details: Link
  2. Testing strategy docs: Link
  3. Meeting Notes: Link
  4. Meeting Link: join here

We have weekly call for discussion about the project. Everyone is invited to join and be a part of discussion. I am eager to have discussion with you all regarding this project. Meeting details are given below:

GSOC’23 - Enhancing Component Test Coverage and Quality for OpenMRS3 Weekly discussion Wednesday, May 31 · 7:00 – 8:00pm Time zone: Asia/Kolkata

Video call link: https://meet.google.com/wfc-ebry-bfh

Thank you for your support, and I welcome any suggestions or advice as I embark on this exciting journey. @jayasanka @jennifer @grace @ibacher @dkigen @vasharma05 @hadijah315 @kdaud @piumal1999 @anjisvj

5 Likes

Hello Everyone, The coding period has started, and I am excited to provide updates on the project progress during the community bonding period. I joined the onboarding call and gained lot of insights on how to complete my gsoc successfully. Then I had meeting with my mentors @piumal1999 and @anjisvj in which we discussed about the project the scope and the timeline. Most of the things are same as I proposed. Mentors are very helpful and explained how should I work efficiently. They also clarified more about the project and how should I proceed with the project.

I was working on improving the existing tests and created an epic for that. Here is the link. I completed almost all the issues and created PR for all the issues out of which three of them are under review.

The links to the PR which I created during the community Bonding Period:-

Below one is the draft PR yet, because one of the test is still failing.

Apart from this I also created a milestone docs for the gsoc2023.

I started my work with fixing the existing tests and then listing out the components for which more tests are needed. Doing so gave me some idea about how the tests are written, what are the issues with the existing tests and what challenges I can face while writing the tests. After completing these step I will move ahead with the mock service worker setup and then start writing the new tests for the improved coverage.

This is the path I will be following throughout the gsoc for each repo, currently I am doing for the patient-management repo and then I will move ahead with patient-chart repo. These two repos are primary focus during the gsoc. If you have an alternative approach that you believe may be more effective, I would greatly appreciate your suggestions.

PROGRESS:

  1. Fixed the existing tests on patient-management repo(almost done)
  2. List out the tests for patient-management repo(done)

UPNEXT:

  1. Setup MSW in patient-management repo
  2. Improve the tests using new setup.
  3. Improve the coverage by writing new tests.

@jayasanka @anjisvj @dkigen @piumal1999 and all that are interested.

1 Like

Hello Everyone Below is my Blog posts:

1 Like

Impressive! Keep up the good work, @ayushmishra !

1 Like

Hello Everyone,

The fourth week of coding Period has been completed and I am excited to provide updated on the project progress during these four weeks. I was working on fixing the existing tests which were getting skipped and had also created an epic for that. I had completed the epic but found that we are left with one more component which tests are getting skipped i.e. identifier-input component. I created another issue for this. Currently this is in progress and getting hard time in fixing these tests. This is the only component left from the epic whose PR is not ready for review yet. Other than that I have two PR which are under review. The PR Links are:-

One PR I got merged for fixing the patient-registration-validation component. Test for this component was integration tests. But after the suggestion of @piumal1999 I changed it to unit tests. This was all for the update for fixing the skipped tests. Let’s move to the next step i.e. the MSW setup.

We are not going to use the MSW you can check this conversation for the reasoning.

Now the next step is to write the new tests. For this I have decided to go by each micro-frontend one by one. I have started working on writing the new tests for the esm-patient-registration-app and created the epic for this. You can check the epic here. I have written tests for the one of the component named field.component.tsx and written all the tests but one of them is failing due to some missing mock values. I have created draft PR for this also. PR link:-

I will work on writing new tests for esm-patient-registration-app throughtout this week.

Thank you for your support. Keep supporting and keep suggesting.