软工测试作业3

来源:互联网 发布:oracle 编程 书籍推荐 编辑:程序博客网 时间:2024/05/29 09:52
---恢复内容开始---

Learn to install and use Junit, Hamcrest and Eclemma

1.Installization 

1.1 Junit

Firstly, download Junit 4.12 from http://junit.org/junit4/

 

In order to install Junit, open Eclipse and find Properties  -> Java Build path -> Add Extential Jars... and find the package you just downloaded.

After some time, your project is ready to use Junit.

1.2  Hamcrest

Firstly, download the package of Hamcrest from their official site.

Then, install the package just like the way you install junit.

1.3 Eclemma

Open Eclipse, and find Help ->Eclipse Marketplace , search for Eclemma and install it.

 

2. Use Junit for testing.

Right click the class you want to test and find New -> Junit test case

 

3.Use of eclemma

 

 

0 0
原创粉丝点击