软件测试lab1

---恢复内容开始---

作业要求:

Install Junit(4.12), Hamcrest(1.3) with Eclipse

  1. Install Eclemma with Eclipse
  2. Write a java program for the triangle problem and test the program with Junit.

a)      Description of triangle problem:

Function triangle takes three integers a,b,c which are length of triangle sides; calculates whether the triangle is equilateral, isosceles, or scalene.

 

 

安装Junit(4.12), Hamcrest(1.3) Eclemma请看上一篇博客/上一次作业

 

首先写好需要用到的类和测试类

 

 

代码请看https://github.com/StarLight1125/Software-Test

 

Junit 和Eclemma 使用截图如下

 

 

 

用Eclemma看一下主类的覆盖情况,没有覆盖到所有

 

再加一个测试用例

 

 

---恢复内容结束---

posted on 2017-03-10 11:45  quxingming  阅读(114)  评论(0编辑  收藏  举报