test lab ~ triangle test by using junit and coverage

first set up a new folder as your test class place, and then let your package in test class folder be the same name with your src folder. in the package of src folder,you can code the entity class, and in the test folder, write test class. here is the file strcture

and I use suite to finish many test case in one test.

here is a entrance class

here us the test parametered class

here is the coverage answer :

you can see src test case is 100%

tools we need are eclemma ,junit.jar,hamcrest.jar

 

posted @ 2016-03-18 11:27  梁俊鹏  阅读(235)  评论(0)    收藏  举报