GSoC 2023: An effective unit & integration test strategy for OpenMRS3
OpenMRS consists of several micro frontend modules and repositories, most of which have unit and integration tests written by individual developers. However, these tests exhibit inconsistencies due to the diverse testing strategies used by different developers. To address this issue, there is a need for a consistent and comprehensive test strategy or framework for the unit and integration tests of OpenMRS3, aimed at achieving a high level of test coverage.
Implementing an effective unit & integration test strategy for OpenMRS3.
Develop a comprehensive testing strategy that can be applied to all OpenMRS3 micro frontends.
Determine what to test (e.g. In react → props, state, rendering, event handling, error handling)
I raised a PR adding patient-flags into RefApp 3.x as an initial task for the ANC prototype but merging is blocked for now because the backend module is not-worthy.
As a matter of fact, I personally had to do some tweaks with this module for successful getting of the flags from the backend.
@jnsereko Thanks for this work. We’re going to hold off on merging this for right now not because the frontend part is in any way not what is called for in the designs, but because I think the backend module needs to be re-engineered before it’s ready to be integrated into the RefApp. In particular, I want to be sure that it performs well enough. Once we have that added to the RefApp, we can merge this PR in.
(PS Validating and re-working the backend module for this would be an excellent GSoC project…)
I looked into O3: Draw on Body Diagram project idea and I think if we can scope it down to mark certain areas of an upload diagram – either with a certain shape, or a single point – and provide support to it with a data structure that can facilitate those meta data we’ll have a well scoped idea for medium sized project. Storing an array of x, y coordinates with the description will be a simple way of achieving this goal, This way we will be able make nice looking and interactive diagrams. There could be different ways like storing them within the digram itself through vector files too. We can put the dynamic drawing as an optional objective of the project and extend the basic implementation to include them later on.
I think a good proposal for this project should include,
A good requirement analysis
A good explanation on how to handle different image types
Good data structure design to store diagram meta data
How to handle the diagram upload and store
How to handle the editing of the diagram on the frontend
How to render those diagrams properly with the edits
Set of wireframes for the UIs
The list of API endpoints that is needed to support those UIs
Even though I won’t be able to write proposal myself since I’m working as a full time SE, I’m very much interested in getting involved in this project to help out whoever that wants to submit a proposal for this idea or even mentor the project if needed.
I’m also interested in 03: Responsiveness & Tablet-based Needs for OpenMRS 3 project. The main objective of this project is to make the responsiveness of the application consistent throughout devices. Since OpenMRS 3 is developed on Tablet first, I couldn’t be able to find many issues on the tablet view in the patient chart. But we can improve the responsiveness in other modules in the application such as Fast Data Entry, Corhort builder and Form builder.
Optimizing the code for better performance. Remove unused code, and optimize loops and conditions.
Test the application on different devices with different screen sizes, and resolutions to ensure the interface is responsive and functions properly on all devices. This will help us to identify more bugs in the interface.
Here are a few things that I think a good proposal should contain.
Requirement gathering (Identifying bugs/issues)
Identified issues in Tablet-based screens
Identified issues in Laptop screens
Implementation plan for
Tab based responsiveness
Laptop based responsiveness
Wireframes depicting the designs
What do you folks think?
I would love to help make it a success by offering my assistance as a mentor or in any other way. Please let me know how I can be of help, as I am enthusiastic about contributing to this project in any way possible.
Hi @dennis I am much interesting in workin gon this project.
In simple terms the project requires migrating the forms from vanella react to reack hooks which enhance better functionality.
Can I create a project topic on the openmrs so we discuss the idea more there or which other way is the best.
My name is Akshat, and I’m interested in participating in Google Summer of Code (GSoC) 2023. I’ve been exploring project ideas on the GSoC website, and I’m particularly interested in your project on " Migrate forms to React Hook Form for OpenMRS 3" .
I’m writing to you to request your guidance on this project and to learn more about your expectations for potential contributors. I’m keen to understand the scope of the project and any resources or materials I should review before getting started.
Finally, I would appreciate it if you could share your email address so that I can connect with you further and keep you updated on my progress.
Thank you for your time and consideration. I look forward to hearing back from you soon.
Technically, it’s more trying to migrate from one form library (Formik,) to another (RHF) while trying to maintain the benefits of using a React-focused form library (minimise unnecessary component re-renders, work with React’s onChange weirdness, validation integration, etc.).
Rewrite the existing integration tests to work with MSW (Mock service worker)
Improve the Unit and Integration test coverage
By Writing the missing tests
By Improving the existing tests
If we can add a GSoC project on this, the selected student can work on fulfilling the main requirements (suggestions) mentioned above.
At the end of the project, the OpenMRS3 modules will have a comprehensive set of unit and integration tests for the existing features. It will enable O3 developers to refer to them when developing new features in the future. It will also help us to move towards test-driven development, which is one of the goals of the QA squad.