APIs, TDD & OpenMRS

Shivang Nagaria
Aug 22, 2017 · 1 min read

Hello Everyone!

Last week I continued working on DINT-82 which is going to complete soon, the complex stuff is done, just need to build on it.

This week is 12th week— i.e. last week of GSoC. I have learned lots of things during this period of 4 month (including 1 month of community bonding). I will include all the things I learned in my final post of GSoC’17 .

Coming back to DINT-82, I had real problem testing the REST APIs I was building. Basically, these APIs are written in Java and there isn’t any default hot-reload support for this so testing them every time you make a change was a real pain. Finally, tired of restarting server again and again I asked my mentors what can we about it ? Darius came to my rescue — I was introduced to test driven development. It is a great method for test if being developed feature is working as it supposed to.

I also learned that how can you mock the database and use it for testing, you just need an xml file with the data.

That’s all for now. Thank!

Useful links:

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store