Junit教程
环境搭建
下载junit-4.12.jar 和hamcrest-all-1.3.jar
下载junit-4.12.jar地址:https://junit.org/junit4/
具体地址:https://search.maven.org/search?q=g:junit%20AND%20a:junit
下载hamcrest-all-1.3.jar地址:https://search.maven.org/search?q=g:org.hamcrest
下载完后如图所示。

eclipse配置

选中所有包,然后打开

最后,应用、保存关闭。
也可使用eclipse自带的Junit



网友评论