软件测试lab1实验报告

一、junit,hamcrest,Eclemma的安装及使用

  1、下载junit-4.12.jar和hamcrest-all-1.3.jar的两个jar包以及eclemma-2.3.3的zip压缩包,如下图

    

  2、先安装junit-4.12和hamcrest-all-1.3.jar到eclipse

  在eclipse中新建此次实验项目jtriangle,右键->Build Path->configure Build Path.在Libraries中,通过Add External JARS,添加junit-4.12和hamcrest-all-1.3两个jar包,如图

   

  3、安装eclemma-2.3.3

  打开eclipse->Help->Install New Software,如下图

  

  点add可添加本地路径的eclemma-2.3.3安装包,按照提示步骤安装完eclemma后重启eclipse,看到工具栏中出现图标即安装成功。

 

二、测试结果和输入用例覆盖率

  运行Junit后的结果,如下图

  

  输入一个测试例子5,5,5,观察Coverage

  

posted @ 2016-03-19 16:16  TJUhby2016  阅读(124)  评论(0编辑  收藏  举报