A quick question about testing some modules

I started to work at a ticket and i realized that a class (OpenmrsUtil.java) has 2 test files for unit testing. One is named OpenmrsUtilUnitTest and one OpenmrsUtilTest both link to OpenmrsUtil . Is this a mistake/bad practice or it is wanted?

Can you provide links for those two test classes? If it both are checking for similar type of cases, then we need tom merge those.

Sure. first one and the second one

Both say in comment Unit tests for {@link OpenmrsUtil}. If you think that we need to merge them i can do that for you and make sure that everything is working.

Can you create a ticket and merge these two tests into one as OpenmrsUtilTest?

Of course.

Could it be that @teleivo was separating unit (OpenmrsUtilUnitTest ) tests from functional or integration (OpenmrsUtilTest ) tests?

1 Like

Ohh, so then can we change the naming of these files according to the type?

yes, that was the reason :slight_smile: I wanted to increase our use of unit tests and not simply add tests to a class that uses a DB (extends BaseContextSensitiveTest). I think we should keep them separate and move more tests over to unit tests.

thanks @teleivo so you want those tests to be tested differently with in each test class