what test tasks need doing?

I might have a little time available to contribute again. I had a brief look around (but I’ve not actually fetched any code from github yet). I see we’re still doing Selenium-based tests for the RefApp? Using SauceLabs now? But it looks like many/most of the tests have been disabled? Are we still having trouble keeping UI/Selenium tests green?

Anyway, I’m just wondering what I could do that would be most helpful. Presumably in the testing arena, because I don’t want to commit to mainline tasks and then not be able to deliver (due to other non-OpenMRS responsibilities).



@leebreisacher, happy holidays and welcome back!

I haven’t been closely involved with the tests lately, but until someone who has chimes in (there is lots of downtime this time of year)…

I believe there is still a problem of random failures when running the UI tests in CI, and this is what led to a bunch of them being commented out (you might want to check the git history on the @Ignored line to check on what was said at the time.

If you were able to put together a better way to spin the tests up that didn’t sporadically and randomly fail for no reason, that would be a big and welcome contribution.

That said, another thing that’s not critical path for OpenMRS, but would still be really welcome is this bug in the module repository: https://issues.openmrs.org/browse/MOD-89

The module repo (modules.openmrs.org) is a grails backend and angular app whose dev environment seems pretty well documented at these two repos (though I haven’t touched it myself):

The modulus version sorting problem looks like it should be pretty easy to fix. But I don’t see how to “look at the rest webservices page in modulus” (as shown in the picture attached to MOD-89). Do I need to install local modulus, etc? Or is there a “public” one where I can see the rest webservices?



Yes, you’d need to run a local version – you really shouldn’t be mucking with the production version, ever (the grails app for the API and the Angular app for the frontend)

I think these instructions tell you how to set up a local dev environment: https://wiki.openmrs.org/x/R5K-B

I’m not sure if this bug is in the server code (in which case you can probably submit a fix based on just build-time unit tests in the server codebase without needing to do the whole setup).

1 Like

There’s also a docker container on Docker Hub

Thanks all. I still don’t see how to “look at the rest webservices page in modulus” as shown in the image attached to MOD-89, so I can reproduce the problem and ensure I’ve fixed it. I did find VersionNumberComparator.java and VersionNumberComparatorSpec.groovy (in tests), and I verified that it does the right thing with, say, 2.8.1 compared to 2.11.1, so that module does not appear to be the cause of the problem.



Hmm, I guess that sentence in MOD-89 is confusing. The idea is that you can see this bug demonstrated by looking at any module published in modules.openmrs.org that has a minor version number of 10 or greater, for example the REST web services module (see https://modules.openmrs.org/#/show/153/webservices-rest and note that versions 2.11 and 2.12 are at the bottom rather than the top).

I’ll clarify the ticket also.

1 Like

If you have some spare cycles to work on tests, please see https://wiki.openmrs.org/display/docs/Automated+Testing+Guidelines

However, the issue with modulus is higher priority.

Sorry to be a pest, but I’m still having trouble reproducing this locally. tbh, I am not that familiar with grails, groovy, grunt, angularjs, etc. But I’m happy to learn and dig in. So, following the instructions at https://wiki.openmrs.org/display/projects/How+to+install+Modulus+and+Modulus+UI#HowtoinstallModulusandModulusUI-Key_Set-Up, I was able to run modulus and modulusUI (I think). But when I try to see the list of modules, I get “Uh oh! Error communicating with the Modulus server. [details] GET /modulus/api/modules 404”. So I assume I have something configured wrong with modulusUI. Modulus appears to be listening on localhost:8080, while modulusUI appears to be on port 8083. Any advice is welcome, I’ll keep digging.



Oh, I forgot to mention…the first step says “Get required key for OpenMRS ID. Fill out this form and wait for your Key…”. I filled out the form, but have not received any reply - maybe due to the holidays?

So it’s quite possible that things are not working because of missing auth.

Also, once I get things hooked up properly, is this local modulus going to actually have any modules to display? How is its database populated?



On Wed, Dec 30, 2015 at 12:56 PM, Lee Breisacher leebreisacher■■■■■■■■■■ wrote:

I can answer the last bit: your local modulus probably won’t have any modules, but you can reproduce the problem by downloading the 2.9 and 2.11 versions of the web services module (for example) and uploading them to your modulus install.

Thanks. I also just remembered that Robby mentioned docker. That’s another thing I’ve been wanting to learn, so I’ll try that too.


On Wed, Dec 30, 2015 at 2:04 PM, Darius Jazayeri talk+noreply■■■■■■■■■■■■ wrote:

If as seen in https://github.com/openmrs/openmrs-contrib-modulus/commit/22ae38b3aa5c01a0b397ab77a05df9c857d87095 the sorting is implemented by a Java class you can just fix and unit test it without the need of learning all these technologies.

Also if I’m not wrong there’s already a version comparator somewhere in the OpenMRS core maybe you could use it if the modulus one does not work as expected.

Yeah, that’s what I thought. So a couple days ago I added some additional unit tests to VersionComparator (thinking it must be a simple bug in there), but alas that class appears to be working properly. So, the problem must be (1) the VC class is not actually getting used, or (2) some other comparator is getting used instead. In either case, I need to dig into the whole pile in order to figure out what’s really going on. A side benefit is that it’s an opportunity for me to learn a bunch of new stuff. OTOH, someone knowledgeable can probably diagnose this much faster than I can, so feel free to jump in.


On Wed, Dec 30, 2015 at 4:37 PM, Lluis Martinez talk+noreply■■■■■■■■■■■■ wrote:

Or maybe LegacyFindModuleServlet is not used to display module versions, and actually the view is pure JS. No idea how AngularJS is used to display and sort lists.

I tried the docker image, but not having much luck there either. I installed docker on Ubuntu inside a VirtualBox (I’m on Windows 10). I see there are two docker images for modulus, one tagged “dev” and one tagged “base”. Do I need them both? What’s the difference? I tried running the “dev” one and it appears to start up ok, but when I try to connect to browse to localhost:8080 or 8083, I get “unable to connect”. I tried to follow the instructions in the docker docs about ufw ( https://docs.docker.com/engine/installation/ubuntulinux/#enable-ufw-forwarding), but that didn’t seem to help.

The actual sorting bug is probably easy to fix, if I could just get a working environment.

Any advice would be most welcome, for either docker-based setup, or getting a proper ID “key” for the config files.



On Wed, Dec 30, 2015 at 5:45 PM, Lluis Martinez talk+noreply■■■■■■■■■■■■ wrote:

The sorting is probably done here:

Yes, I know. And that code looks (more or less) correct. The question is why it is not working. To determine that, I would like to have a running environment that I can debug and try out fixes. That’s what I’m trying to get to.



On Thu, Dec 31, 2015 at 1:31 PM, Lluis Martinez talk+noreply■■■■■■■■■■■■ wrote: