Continuing the discussion from Google Summer of Code (GSoC) 2025 Officially Announced:
hello @all
I created this new topic to ask my personal doubts about the testing and integration process and to increase the coverage
The first task is to understand the coverage report and solve the missing coverage one at a time
Is it just me or the codebase is really tough to understand
can somebody give hints or bifurcations of the service and controller layers.
I feel like there is too much to look at.
somebody guide me please I have gone through the files(not all) but I just keep getting confused.
where specifically do you want guidance @Ayush_Jha
We have both the frontend and backend in the same repository.
Now to locate the controllers, service layer methods, you need to click in each subdirectory representing an object used in openelis. For example: OpenELIS-Global-2/src/main/java/org/openelisglobal/patient at develop · I-TECH-UW/OpenELIS-Global-2 · GitHub, when you click patient, you fill find the other subdirectories related to the patient i.e service, controller, value…etc.
@Agaba_Derrick_Junior
see classes like PatientService
and TestService
, but I’m not clear on:
How business logic is split between these services (like what belongs to PatientService
vs. PersonService
).
and also like how the service layer talks to the controllers. Like, when a controller calls PatientService
, what exactly happens? How do DAOs fit in? And I’m not sure where business logic lives vs. basic CRUD stuff. CAn you like point me to one simple flow (e.g., fetching a patient) to see how the layers connect? or just give example.
Also Like suppose for
patientreport.java
the test coverage shows very low So do we need write the unit tests also right? Because it would be more beneficial
if I start with unit tests and then move to integration test which is the actual task.
Basically the PatientService handles patient-specific business logic (like getSubjectNumber()
or getNationality()
), while PersonService manages personal details (e.g., name, birthdate). DAOs handles basic CRUD operations, querying the database and acting as a bridge between the application and the database.
an example in the Patient’s Test
patientService.get( )
which fetches a patient.patientService.insert(patient)
and this saves a patient and its a (basic CRUD).patientService.getSubjectNumber(patient)
returns business logic tied to the patient.
hope this is rich enough to break it down
The most important task is to begin with Intergration tests see example