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管理项目 ...
随机推荐
- loadrunner Analysis :SLA(Service Level Agreement服务水平协议)
SLA是为负载场景定义的具体目标,用于与实际负载结果比较,确定系统是否达到性能目标. 1.1.1 设置SLA(以Transaction Response Time(Average)为例) 可以 ...
- 以Tomcat+Mysql为例,实现Docker多容器连接
Docker提供了多个容器直接访问的方法,最简单的方式是直接使用端口映射-p参数指定映射的端口或者-P映射所有端口,多个容器直接通过网络端口进行访问. 但网络端口映射方式并不是Docker中连接多个容 ...
- Mac bash rc
###################################### ########## .bashrc ###################################### cas ...
- MyBatis:学习笔记(3)——关联查询
MyBatis:学习笔记(3)--关联查询 关联查询 理解联结 SQL最强大的功能之一在于我们可以在数据查询的执行中可以使用联结,来将多个表中的数据作为整体进行筛选. 模拟一个简单的在线商品购物系统, ...
- asp.net权限认证:OWIN实现OAuth 2.0 之密码模式(Resource Owner Password Credential)
asp.net权限认证系列 asp.net权限认证:Forms认证 asp.net权限认证:HTTP基本认证(http basic) asp.net权限认证:Windows认证 asp.net权限认证 ...
- context:annotation-config, mvc:annotation-driven, context:compont-scan 区别
当我们需要使用BeanPostProcessor时,直接在Spring配置文件中定义这些Bean显得比较笨拙,例如: 使用@Autowired注解,必须事先在Spring容器中声明AutowiredA ...
- 关于js 构造 onclick 方法中传递Guid参数问题
转义字符单双引号用法:\' 与 \" 例如: $.getJSON("data.json", function(data, status, xhr) { $(" ...
- 网站SEO,HTTP请求的关键数字----6
客户端浏览器向服务器请求一个网页素材. 那么网页素材是通过什么方式,什么顺序被下载下来的呢. 我今天做了个简单的测试. 首先,准备测试文件 写一个网页,网页中引用若干的资源文件. 同一文件的不同的参数 ...
- Android系统之灯光系统--通知灯深入分析
Android通知灯的深入分析 通知的类别 声音 振动 闪灯 APP如何发出通知灯请求 getSystemService(通知服务) 构造notification 类别 其他参数(颜色,onMS,of ...
- Weex系列二、显示图片
上次我们创建了一个简单的Weex的demo. 一.常用的类 WXSDKEngine:SDK开放的绝大多数接口都在此有声明. WXLog: 用来打印日志. WXDebugTool: weex提供的对外调 ...