Week 06: GSoC 2022 with OpenMRS

Coding Period Week 06

Pasindu Rupasinghe
2 min readJul 26, 2022


Gsoc:2022 with OpenMRS

Hello Everyone.

It is the sixth week of the coding period in Gsoc:2022. In the previous week, I started work on implementing a feature in 3.x E2E testing tool to avoid data mutations in tests. You can read the past week’s blog post here. In this blog post, I’ll be sharing the experience of the sixth week in Gsoc:2022.

So I was able to finish up the pull request that I created for the above feature. Mainly I had to fix two issues with this implementation.

  1. Fix the issues related to connecting the database with MySQL.
  2. Fix command errors that occur with dumping that database.

Connecting to database

With this implementation, our plan is to use a script to run MySQL commands to connect to the database to make a dump of the initial snapshot of the database. For the purpose first I used the following basic command:
mysql -u openmrs -popenmrs openmrs

And the basic command wasn’t helpful for connecting the dockerized version of the database. It needed to define the host, port, and protocol as well. For that purpose, I had to change the above command to the following command:
mysql -h localhost -P 3306 — protocol=tcp -u openmrs -popenmrs openmrs

Dumping the database

The second challenging point occurred in dumping the database. The Mysql connection was successful with the above command. But the command exited with an error. Error log. The dump command couldn’t execute the select command since previously I wasn’t defining the table space and column statistics. So for that purpose following commands was a success.
mysqldump — no-tablespaces — column-statistics=0 -h localhost -P 3306 — protocol=tcp -u openmrs -popenmrs openmrs > openmrs.sql

With that, both commands for making the dump and restoring the database work fine. And the pull request was reviewed by the mentor and it merged.

Also, I worked on fixing the existing tests in the testing tool. And out of 5 tests we have completed 2 tests, and one will remain under construction.

Completed tests:
1. Patient registration test-PR
2. Patient search test-PR

That’s about my experience during the sixth week in the coding period in Gsoc:2022. Next week I will be working on fixing the other test cases as well and start work on designing the logout test for the testing tool.

Thank you for reading the blog! See you in Week:7 Blog. :)



Pasindu Rupasinghe

Undergraduate at University of Colombo School of Computing.