OpenMRS resources: Difference between revisions

imported>Hypotext
imported>Hypotext
Line 151:
 
== Making Unit Tests ==
Once you've fixed the bug or added the new feature, you want to make sure that others don't break it. To do this, find existing tests in the code base that relate to your ticket. Modify(We existingwon't teststell soyou thatexactly theywhere properlyto testfind forthem, thebut newif behavior.you're Then add any additional testsstuck, you findcan necessaryrefer to ensure that your changes are kept when future contributors start messing with the code. Once this is done, reTRUNK-compile3780 andmerged re-testpull yourrequest.) changes to make sure everything works.
 
Modify existing tests so that they properly test for the new behavior. Then add any additional tests you find necessary to ensure that your changes are kept when future contributors start messing with the code. Once this is done, re-compile and re-test your changes to make sure everything works.
 
You can run tests by doing `mvn clean install` in the top-level openmrs-core directory. Check the output to see which tests fail and pass.
Anonymous user