APIs, TDD & OpenMRS

Shivang Nagaria
1 min readAug 22, 2017

--

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:

--

--

Shivang Nagaria

GSoC Student @OpenMRS, Crazy Developer, Budding Entrepreneur, Full Time Learner