Sync 2.0 automated testing


(Tomasz Mueller) #1

Hi,

As a part of our Sync 2.0 work, we wanted to add some automated tests in FHIR module. However, some changes on openmrs-contrib-uitestframework need to be applied to make them run and it seems I don’t have permissions to adding PRs in this project. Anyone can help me with that? @darius, @raff, anyone?

btw. what is the current status of the OpenMRS UI Tests? I couldn’t run them as well

Regards, Tomasz


(Daniel Kayiwa) #2

@tmueller i guess you mean’t permission to merge pull requests for that repository. Granted. :slight_smile:


(Daniel Kayiwa) #3

@tmueller i have just been reminded by @darius that i should have made you a /dev/3 because they have write privileges to all modules and you by now qualify to become one. So i have instead just done so and congratulations for becoming a /dev/3 :smile:


(Tomasz Mueller) #4

Thanks, @dkayiwa :smile:


(Rafal Korytkowski) #5

@tmueller, UI tests against RA are run every build and passing. See https://ci.openmrs.org/browse/REFAPP-OMODDISTRO-INTTESTS-8057/log

Are you following https://github.com/openmrs/openmrs-distro-referenceapplication#running-ui-tests-locally ? Note that you have the most chances to run them successfully having the matching browser version. What errors do you get?

Also could you please give some examples of tests that you are intending to write for the FHIR module? UI tests are generally hard to maintain and it’s best to keep their number low.


(Tomasz Mueller) #6

Hi, @raff

Nice to hear from you, I hope your doing well:)

Thanks, I didn’t follow UI tests for quite a long time and I was missing this info. I’m actually using Firefox 63.0 and it was probably a main reason why it failed as I locally needed to add new version of geckodriver to properties to make the tests run successfully. So, do you suggest downgrading Firefox to 42.0 to run our UI tests or do you see some other solutions?

The tests I intend to write are about FHIR mapping and Sync 2.0 synchronization like SYNCT-174.

Regards, Tomasz


(Rafal Korytkowski) #7

You could try setting our automated tests to use newer browsers at https://github.com/openmrs/openmrs-contrib-uitestframework/blob/master/src/main/java/org/openmrs/uitestframework/test/TestBase.java#L122-L123 and upgrade drivers for running locally.

Putting that aside SYNCT-174 seems to be better addressed with an integration test over REST API instead of UI. Your intention seems to be to test if the backend works and not the UI, unless I misread that.