码迷,mamicode.com
首页 > 其他好文 > 详细

2017 软件测试 实验一

时间:2017-03-12 13:37:50      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:实验   cli   选择   test   ble   failure   总结   clip   uil   

  1. 在eclipse上安装junit, hamcrest and eclemma

  a.打开eclipse,在工作区,右键JRE Systerm Library ->build path ->configure build path ->在Library 中选择 Junit -> ok .完成后成功添加 Junit. 部分截图如下

 技术分享

 

  b.下载Junit(4.12), Hamcrest(1.3) 库放入方便的路径,在eclipse工作区,右键JRE Systerm Library ->build path ->configure build path -> Add External JARs –>选择自己下载好的库 –> ok.部分截图如下

 技术分享

 

  2.Install Eclemma with Eclipse,打开Eclipse -> help ->Eclipse Marketplace ->搜索 eclemma ->install –> 再按照提示操作即可安装eclemma. 部分截图如下

 技术分享

 

  1. Write a java program for the triangle problem and test the program with Junit.代码截图如下

  a.类文件

 技术分享

 

  b.junit 测试

 技术分享技术分享

 

  3. 测试结果

 技术分享

 

 

  4.总结

使用单元测试能很好的找到 error 和 failure.  Junit 很实用。

2017 软件测试 实验一

标签:实验   cli   选择   test   ble   failure   总结   clip   uil   

原文地址:http://www.cnblogs.com/yueyingshuanglan/p/6537473.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!