GSoC 2021: E2E Automated Tests for the OpenMRS 3.0 RefApp

Project Title: E2E Automated Tests for the OpenMRS 3.0 RefApp

Primary mentor: @k.joseph

Backup mentor: @bistenes

Student: Jayasanka Weerasinghe

Project Link: GSoC 2021: E2E Automated Tests for the OpenMRS 3.0 RefApp


Asa result of the Microfrontend Team’s tireless efforts, OpenMRS will soon have its new edition “OpenMRS 3.0”. Most of the MFE applications have unit tests and integration tests. Those tests will take a small part of the application and assess that part in isolation. However, even the small parts of the application work fine, It does not guarantee that they will work together as a group. This is where the E2E tests (End-to-End Tests) additional test layer comes into play. The goal of the project is to set up E2E tests that automate realistic User Workflows to ensure that they work as they should.


  1. Evidence that the squad/dev team regularly references the automated tests during PRs (i.e. they use them to catch if their PR will break something, and so they fix their code quickly rather than waiting for manual tests to catch something weeks or even months later)
  2. Evidence that the squad/dev team regularly references the tests during releases every 1-4 weeks (e.g. “ok the tests are all green, we can release without doing painful manual QA) (though for 2. to be possible we need an actual production environment setup; discussion about that happening here: Creating a build pipeline for OpenMRS 3.0
  3. Business-type stakeholders (e.g. Grace, JJ, Dimitri, Eric) feel confident in releasing / they trust the tests
  4. The qaframework README should have
  • Badges showing test statuses
  • Clear instructions for local dev setup
  • Explanation of the testing architecture




Pull requests:


Weekly Blog Posts


Future Work

  1. Create a GitHub workflow to run RefApp 3.x E2E rests in a dockerized environment We need to make the tests repeatable despite data mutations. Ideally, the tests would run against a dockerized server and dockerized database where the data is in the image/container itself, such that any changes are lost each time a new container is spun up. Read More.
  2. Implement the rest of the workflows listed here.
  3. Enhance the developer experience in creating new workflows. The current setup takes a lot of time to run tests because cypress clears the cache and it needs to download the resources (~30MB) every time it runs a test. The loading time can be decreased by either finding a way to cache the files or running the test instance locally.

Final Words

This is my second time being chosen for Google Summer of Code. While working on my project, I was able to unofficially mentor two other GSoC projects at OpenMRS. Working at OpenMRS was always been a pleasure for me. Not only have my programming skills improved but so have my soft skills, such as communication and presentation.

I’d like to thank my primary mentor, Kawesi Joseph, who passed away from us during the project. He was always a pleasant person and an excellent mentor to me. I am also grateful to Brandon Istenes, my secondary mentor, who assisted me greatly in completing this project successfully. I am also grateful to Grace Potma, Ian Bacher, Daud Kakumirizi, and Sharif Magembe for their assistance throughout the project. I’d also like to thank Herbert Yiga for always encouraging us to post our updates on time. A special thanks to Akshika Wijesundara for introducing me to OpenMRS. Finally, I’d like to express my gratitude to Google and OpenMRS for providing me with this fantastic opportunity!


Weldone @jayasanka , this is an amazing work, youve realy initiated the bones of refApp 3.x automations. Thanks very much and thanks to @bistenes @ibacher @dkayiwa @kdaud for tremendous reviews.

1 Like

All is well that ends well !

Great Work Deserves Appreciation ! kudos @jayasanka :fireworks: :fireworks:

Looking forward working with you in automated tests for 3.x Reference Application

1 Like

Thanks, @sharif and @kdaud for encouraging me since the beginning! :heart:

1 Like