Running and Creating Unit Tests on OpenMRS Core

DISCLAIMER: I am a beginner developer who participated through GCI. :slight_smile:

I have followed the following guide for unit tests . It recommends the plugin to use the Generate Test Case plugin. It adds a feature wherein you can automatically generate test cases.


However, upon testing this, this does not work and results in the following error.

I have tried installing this on on Eclipse 2018-09 and Eclipse Mars. However, downgrading further, I would need to downgrade to Luna, of which apparently does not support Java 8.

It crashes with the error.

43%20PM 19%20PM


If there would be a different or more updated way of writing unit tests, I think this should be documented in the Unit Testing guide.

However, if this is truly an issue, I think for starting OpenMRS contributors like me, it could be useful to edit this, and provide troubleshooting this section, if ever I am doing something wrong. :slight_smile:

Please advise!

A discussion happened on this thread: rethink unit test style to remove duplication

Do you have enough time to go through it and update our documentation as per what was agreed there?