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管理项目 ...
随机推荐
- Linux释放内存脚本
vi recover_mem.sh #!/bin/bash ################## #author:rrhelei@126.com# ################## #系统分配的 ...
- qlv格式转换成MP4格式
腾讯视频下载:1.先下载腾讯的客户端--->播放视频在客户端 2.播放视频一段后停止 3.点击腾讯客户端的右上角的设置 4.复制缓存地址(注意:在此之前需要设置"显示隐藏的文件夹&qu ...
- 使用IDEA开发及测试Spark的环境搭建及简单测试
一.安装JDK(具体安装省略) 二.安装Scala(具体安装省略) 三.安装IDEA 1.打开后会看到如下,然后点击OK
- spring EL表达式,null-safe表达式
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns:xsi="http://ww ...
- JavaScript基础:创建对象
先来看两种简单的对象创建方式: 1.Object构造函数方法 var person = new Object(); person.name = "Nicholas"; person ...
- 2016年,总结篇 之 VueJS 如何入门(一)
接着 2016 年的总结,我们来看看 2016年 国内最火且没有之一的前端MVVM 框架 VueJs 虽然 到写文章的这个时间点,VueJs已经发布了 2.1.x 了, 但是对于很多 Vuejs 的初 ...
- JS中常见排序算法详解
本文将详细介绍在JavaScript中算法的用法,配合动图生动形象的让你以最快的方法学习算法的原理以及在需求场景中的用途. 有句话怎么说来着: 雷锋推倒雷峰塔,Java implements Java ...
- Hadoop权威指南:压缩
Hadoop权威指南:压缩 [TOC] 文件压缩的两个好处: 减少储存文件所需要的磁盘空间 加速数据在网络和磁盘上的传输 压缩格式总结: 压缩格式 工具 算法 文件扩展名 是否可切分 DEFLATE ...
- [html5] 学习笔记-Canvas应用
通过使用HTML5游戏开发的引擎CreatJS,创建HTML5 Canvas上的更好交互. 1.认识CreateJS CreateJS是一个外部库,用它可以比Canvas更方便的绘制图形. 官网:ht ...
- java系列笔记---正则表达式(2)
正则表达式 说真的正则表达式真不好写,当我收集资料准备开始写的时候,发现收集的东西越来越多范围也越来越广,我文章的前提就是文章要清晰, 在缕清自己思路之后,我从先简后难的方式来写有关正表达式,你们如果 ...