【软件测试】JUnit、Hamcrest、Eclemma的安装

来源:互联网 发布:网络教育本科学位难吗 编辑:程序博客网 时间:2024/06/06 03:41

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.


0 0
原创粉丝点击