lab1-Junit&Eclemma
Software Testing, Lab 1
March 10. 2016, by 赵国佺(3014218108)
一、 environment setup
Firstly, I download the eclemma Zip from our ST’s course web. Because it is my first time to add plugins into Eclipse. So I search it on the Internet, by the help of them. I copy the file and paste it into the dropins folder. And delete a file.

Ok, if we can see the pic on the tool list, the eclemma is installed successfully.
What is more, the jUnit is a very powerful plugin and it’s also to use.
Click right button on the project folder->choose properties->Java Build Path->Add external JARS(choose what you want* hamcrest and jUnit)
After we do this, we have already setup the Testing environment.
二、 code and analysis
1.Test with no error.
Because I push my code on the Internet, So what I use in this section are only printscreens.
Step1: Writing the Java code. (Triangle Class)
Step2: Use some true test case to test.

What is more, running the code with jUnit, we will get the results, all right.


And click the Coverage As, we get the result——

Because we use all the right test cases, so we get the 100% coverage.
2.Test with some errors.

If we delete the Annotation, the jUnit will help us to find failure.

Also can find the wrong code not be covered. The coverage percent is deceased to64.1%.

lab1-Junit&Eclemma的更多相关文章
- 软件测试:lab1.Junit and Eclemma
软件测试:lab1.Junit and Eclemma Task: Install Junit(4.12), Hamcrest(1.3) with Eclipse Install Eclemma wi ...
- ST Lab1 junit test
代码地址: https://github.com/newff/st-lab1 Tasks: Install Junit(4.12), Hamcrest(1.3) with Eclipse Insta ...
- Junit,hamcrest和Eclemma安装及使用
Junit和hamcrest下载及安装 下载地址 Junit http://download.csdn.net/detail/luzle/6915487 Hamcrest http://d ...
- 单元测试系列:如何使用JUnit+JaCoCo+EclEmma完成单元测试
更多原创测试技术文章同步更新到微信公众号 :三国测,敬请扫码关注个人的微信号,感谢! 原文链接:http://www.cnblogs.com/zishi/p/6726664.html -----如 ...
- 使用junit和eclemma进行简单的代码测试
1.Junit和Hamcrest的安装 可以在https://mvnrepository.com/上面下载所需要的Junit和Hamcrest的jar包,然后在项目中新建一个lib文件夹,将下载好的j ...
- 单元测试系列之一:如何使用JUnit、JaCoCo和EclEmma提高单元测试覆盖率
更多原创测试技术文章同步更新到微信公众号 :三国测,敬请扫码关注个人的微信号,感谢! 原文链接:http://www.cnblogs.com/zishi/p/6726664.html -----如 ...
- Software Testing Techniques LAB 01: test Junit and Eclemma
1. Installing 1. Install Junit and hamcrest First, I download the Junit-4.12.jar and hamcrest-core- ...
- 软件测试Lab 1 Junit and Eclemma
首先安装eclipse 然后下载hamcrest-core-1.3.jar,下载地址:http://mvnrepository.com/artifact/org.hamcrest/hamcrest-c ...
- JUNIT单元测试时统计代码的覆盖率工具eclemma安装
EclEmma是Eclipse里的一个插件,安装简单,覆盖率显示直观.安装EclEmma.打开Eclipse,点击Help → Software Updates → Find and Install, ...
- 软件测试入门 1—— junit 单元测试
一.实验主要内容: 1. 2.EclEmma安装 见: http://www.cnblogs.com/1995hxt/p/5291465.html 二.对与 Junit 安装,使用 maven管理项目 ...
随机推荐
- FMS之Multi-point publishing技术
采用该技术,能large-scale你的直播系统,结构如图所示: A. Live Video B. Server 1 (New York City) C. Server 2 (Chicago) an ...
- jQuery查询性能考虑
http://blog.163.com/neusoft_hao@yeah/blog/static/120544724201282810510215/
- NodeJS异步I/O解析
在现在的项目开发中,任何一个大型项目绝对不是简简单单的采用一个种语言和一种框架,因为每种语言和框架各有优势,与其死守一个,不与取各家之所长,依次得到一个高性能.搞扩展的产品. 对于一个.NET开发者, ...
- redis使用Lua脚本
最近在看<Redis入门指南>第二版,感觉收获挺大,推荐大家有时间看一看.其中有一章讲Lua脚本,感觉挺实用,把总结整理一下. Redis在2.6中推出了脚本功能,允许开发者使用Lua语言 ...
- jmeter测试计划
测试计划配置 用户定义的变量: 测试计划上可以添加用户定义的变量.一般添加一些系统常用的配置.如果测试过程中想切换环境,切换配置,一般不建议在测试计划上添加变量,因为不方便启用和禁用,一般是直接添加用 ...
- UE4里的渲染线程
记的上次看过UniRx里的源代码,说是参考微软的响应式编程框架,响应式编程里的一些理论不细说,只单说UniRx里的事件流里的事件压入与执行,与UE4的渲染线程设计有很多相同之处,如果有了解响应式编程相 ...
- CSS_position
1. HTML Code: <div id="example"> <div id="div-before"> <p>id = ...
- chrome浏览器360浏览器图片无法加载提示等待可用套接字问题
前端时间遇到chrome,360浏览器无法加载图片问题,提示等待可用的套接字 后来发现原因,原来是使用html5<video>标签时使用了默认的配置,默认情况下<video>标 ...
- iOS RunTime你知道了总得用一下
说点题外话: 我刚来现在这家公司的时候,老板让我下载一个脉脉,上去找找自己的同行,多认识些同行.其实初衷的好的,但最近这两天我把它卸载了,不为别的,负能量太多!iOS这行自从2016就没景气过,在这行 ...
- 【吐血整理】SVN命令行,Subversion的正确使用姿势,让版本控制更简单~
一.写在前面 前面一直博主一直用svn的桌面版本,但看项目经理一直都用的命令行方式,不为性能,还能直接装逼呀!在这里先感谢赵哥,也把它分享给感兴趣的你们~ 二.直接上干货 1. svn checkou ...