A quick question about testing some modules


(Andrei Stanila) #1

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?


(Suthagar Kailayapathy) #2

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.


(Andrei Stanila) #3

Sure. first one and the second one


(Andrei Stanila) #4

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.


(Suthagar Kailayapathy) #5

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


(Andrei Stanila) #6

Of course.


(Daniel Kayiwa) #7

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


(Suthagar Kailayapathy) #8

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


(Ivo Ulrich) #9

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.