The lab1 for software testing

 Brief description

In this lab, we first use junit to do the testing. Firstly, we should install the junit, hamcrest and eclemma.

 

1. Install junit

As for install junit, we need to download the junit.jar from the http://junit.org/junit4/. After that, we use the Eclipse IDE to create a java project, and we click the properties of the project. See figure1

                                                     

                                                                                                  Figure1 

 

Then we choose the Java Build Path, and click the Add Library and select the JUnit, see figure2:

                                                                 

                                                                                                        Figure2

If the above steps are done, we have done the installation for Junit.

 

2. Install hamcrest

 

The steps for hamcrest installation are the same as the junit installation. First, we should go to http://code.google.com/p/hamcrest/downloads/list to download hamcrest.zip. Next, we should right click the project and choose Build Path / Add External Archive, and select hamcrest-core-1.3.jar、hamcrest-library-1.3.jar. After doing those, you will see project properties like figure3:

                                                      

                                                                                               Figure3

 

3. Install eclemma

Firstly, we need to open the Eclipse, click the Help menu and select the Install New Software, and click the Add.

 

Then we input the name Eclemma and input the location: http://update.eclemma.org/

 

Next, we choose the location which we inputted before.

All had been done after above steps.

 

Test Results

 

 

Coverage results:

 

转载于:https://www.cnblogs.com/forThree/p/6531435.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值