1 Eclipse 中Junit 的配置
Eclipse IDE 中集成了JUnit 组件,无须另行下载和安装,但是为了更好的使
用Junit(更多细节请参考http://www.junit.org ),我们还要在Eclipse 中进行一些设
置。其中主要是就是类路径变量的设置。
1.1 创建变量JUNIT 和JUNIT_SRC
在project 的classpath 中添加junit.jar。因此,建立一个新的classpath 变量
JUNIT。选择Window -> Preferences 菜单栏打开Preferences 对话框,如图所示。
展开Java 结点,选择Build Path -> Classpath Variables 项,如图所示。
然后点击New 按钮打开New Variable Entry 菜单,输入新的变量名: JUNIT , 配置路径为junit.jar 。在Eclipse3.0.2 中, 能够在/eclipse/plugins/org.junit_3.8.1/junit.jar 下找到junit.jar。然后点击OK,
如图 所示。
Eclipse安装插件——junit
最新推荐文章于 2025-04-28 17:22:52 发布