Built In Reports For referenceapplication to be automated


Am trying to carryout an automated test for Reporting in openmrs through this ticket [RATEST-224] E2E Test: Running reports. - OpenMRS Issues, However am having few challenges while implementing this workflow. For this workflow, i was thinking the easy way of testing on legacy UI which is direct approach but i was advised if possible we carry it out via built in report approach

Currently openmrs built in reports is not supported via reference application application UI https://qa-refapp.openmrs.org/openmrs/reportingui/reportsapp/home.page , this can only be configured via manageApp and adding a configured json file for the default reports we would love sitting in that report APP.,

However one major issue to achieve this, we need to bundle GitHub - openmrs/openmrs-owa-builtinreports: Open Web App: built-in reports for OpenMRS Reference Application back to referenceapplication distro, Am quite not certain if this is the only way of achieving this, Because i have seen this being achieved in referencemetadata handling built in reports though i think this is working under the hood for API We want to be able to have reports in reference application like this

such that we can easily automate them , there are already build reports that by default we can use like Number of registration, visits, so no need of writing SQL to create a new reports . Your guidance and direction will be highly appreciated.Thanks cc @dkayiwa @ibacher @mozzy

Hello @mozzy , do you have any idea about this approach.

The Ticket mentions about these two simple Listing reports

  • Number of Patient Registrations
  • Number or Visits

These can be simply visualized in the Reff app UI by simply configuring the reporting App .

we can still add these as a default configuration for the Reporting app , to avoid displaying an empty reports page in the ref app

i tried this out but it wasn’t visualised , Are we supposed to use built_in_reports owa module ?

Not sure exactly what you did, but this doesnt require the built_in_reports owa

Here the json file i used Configured Report App JSON - Pastebin.com but the app didnot reflect anything, am i supposed to use the exact report url that is already defined in the system

Hello @mozzy @dkayiwa @ibacher , This is how i was trying out this , i picked any report Url that is already written with in the system forexample https://qa-refapp.openmrs.org/openmrs/module/reporting/reports/reportEditor.form?uuid=d71b5170-5283-11e7-b114-b2f933d5fe66

Then i added this report into the json file but am still blocked, this report app doesn’t return anything, Am not sure if am missing out on something. Your help will be appreciated

Then used this kind of json file

        "id": "my.reportingui.reports",
        "description": "Homepage showing a list of different kinds of reports",
        "order": 10,
        "extensionPoints": [
                "id": "org.openmrs.module.reportingui.reports.overview",
                "description": "Links to available Overview Reports",
                "supportedExtensionTypes": [ "link" ]
                "id": "org.openmrs.module.reportingui.reports.dataquality",
                "description": "Links to available Data Quality Reports",
                "supportedExtensionTypes": [ "link" ]
                "id": "org.openmrs.module.reportingui.reports.dataexport",
                "description": "Links to available Data Exports",
                "supportedExtensionTypes": [ "link" ]
        "extensions": [
                "id": "reportingui.reports.homepagelink",
                "extensionPointId": "org.openmrs.referenceapplication.homepageLink",
                "type": "link",
                "label": "reportingui.reportsapp.home.title",
                "url": "reportingui/reportsapp/home.page",
                "icon": "icon-list-alt",
                "order": 5,
                "requiredPrivilege": "App: reportingui.reports"
                "id": "Number of Patient Registration",
                "extensionPointId": "org.openmrs.module.reportingui.reports.overview",
                "type": "link",
                "label": "Number of Patient Registration",
                "url": "reportingui/reports/reportEditor.form?uuid=d71b5170-5283-11e7-b114-b2f933d5fe66
                "order": 1,
                "requiredPrivilege": "App: reportingui.reports"

@sharif aren’t the underlying tests in the reporting module, just enough for this? openmrs-module-reporting/api-tests at master · openmrs/openmrs-module-reporting · GitHub

1 Like

Thanks @dkayiwa , we want to be able to test the UI of the reports, but i consent we however test the reporting API . thanks i think we can do the API testing as suggested from the above URL

Hello @dkayiwa @ibacher , According to the call we had with @christine @jennifer @kdaud , we suggested to carryout a simple reports and configure them under report app configuration, We shall be picking at least already written reports and configure them then have those automated.

Have been able to configure it here on qa server However one main problem is that we wont have this on the system by default, it need to be configured on the system direct such that it is accessible cc @dkayiwa @ibacher @mozzy

We can simply automate them now here is an adHoc export configuration which can be used as an example

How will i be able to have a configuration of already built in reports, i can only have access to Hospitalization Diagnosis Report which comes by default in the json { "id": "my.reportingui.reportss", "description": "Homepage s - Pastebin.com , Have been able to write functionalities am supposed to automate here RATEST-224:Adding report definition configuring by sherrif10 · Pull Request #585 · openmrs/openmrs-distro-referenceapplication · GitHub


{ “id”: “my.reportingui.reportss”, “description”: "Homepage s - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

#585 RATEST-224:Adding report definition configuring

This adds an app definition for reports configuration, then from this page its where we shall be able to use reporting app under system administrationhttps://issues.openmrs.org/browse/RATEST-224

https://github.com/openmrs/openmrs-distro-referenceapplication|openmrs/openmrs-distro-referenceapplicationopenmrs/openmrs-distro-referenceapplication | Oct 10th | Added by GitHub


@dkayiwa but now having Number of patient registration json file to configure is my blocker currently, tried configuring legacyui part but it thrown an error 404 page not found Exeptipn


is there any help for having that configured

Am still not able to have that report configured using the defined json file, am tempted to use built in report app owa module which i think it was deprecated

Hello @dkayiwa , i think another option to have this accomplished is to go legacy UI option since we wont be able to have that report configured but rather use already built in reports

Is the user interface, of the built in reports that you are trying to test, provided by this? GitHub - openmrs/openmrs-owa-builtinreports: Open Web App: built-in reports for OpenMRS Reference Application

@dkayiwa Yes, if we can have built -in- reports again running in our instance, it would look more visual because it provides more built in reports, Another option would be configuring it under manage apps but this limits us with one single Adhoc report config

Hello @dkayiwa , what i did, i used legacy UI to have this simulated but it would look more nicer if we can have built-in-reports owa working again in distro.

Am not aware of anyone maintaining that repository. Its last commit was made more than a year ago. And also given the fact that we are deprecating the OWA technology, i do not find it necessary to develop automated tests for it.

Sounds good, Ok so we shall do it the other way around using legacy UI part. Have already shared a Pr waiting for it to have it approved and proceed write that automated.Thanks @dkayiwa.