JUnit、Hamcrest、Eclemma的安装

JUnit

去JUnit的官网http://junit.org/junit4/下载junit的jar包


点击“jar”下载junit的最新jar包。

下载成功后的图标


Hamcrest

去hamcrest的官网http://hamcrest.org/下载hamcrest的jar包


下载hamcrest-all的jar包。

下载成功后的图标



在Eclipse中安装JUnit和Hamcrest

打开eclipse软件,新建一个java工程,在工程下面新建文件夹lib,如下图所示


将下载好的junit-4.12.jar和hamcrest-all-1.3.jar放入文件夹lib中,如下图所示


选中项目,点击右键,然后build path,如下图所示


生成如下图所示的文件


到此为止,JUnit和Hamcrest已经安装成功。


在Eclipse中安装Eclemma

 From your Eclipse menu select Help → Eclipse Marketplace.

 Search for "EclEmma".

 Hit Install for the entry "EclEmma Java Code Coverage".

 Follow the steps in the installation wizard.


Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐