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管理项目 ...
随机推荐
- BNU Online Judge-34777-Magical GCD
题目链接 http://www.bnuoj.com/bnuoj/problem_show.php?pid=34777 题意 如样例 输入 1530 60 20 20 20 输出 80 如 30 和 ...
- oracle 查询哪些表分区
如果查询当前用户下得分区表:select * from user_tables where partitioned='YES'如果要查询整个数据库中的分区表:select * from dba_tab ...
- GreenDao 3.2.0 的基本使用
前言 Android开发中我们或多或少都会接触到数据库.Android中提供了一个占用内存极小的关系型数据库-SQLite.虽然Android系统中提供了许多操作SQLite的API,但是我们还是需要 ...
- python中关于元组的操作
元组的基本操作:1.创建一个元组: tuple=(1,26); tuple1=(","sy"); 创建一个空元组: tuple=(); 元组中只包含一个元素时,需要在元素 ...
- Hadoop权威指南:HDFS-数据流
Hadoop权威指南:HDFS-数据流 [TOC] 剖析文件读取 客户端通过调用FileSystem对象的open()方法来打开希望读取的文件,对于HDFS来说, 这个对象是分布式文件系统的一个实例 ...
- 在C++中反射调用.NET(二)
反射调用返回复杂对象的.NET方法 定义数据接口 上一篇在C++中反射调用.NET(一)中,我们简单的介绍了如何使用C++/CLI并且初步使用了反射调用.NET程序集的简单方法,今天我们看看如何在C+ ...
- Eclipse 报java.lang.UnsupportedClassVersionError: ("yourclass") bad major version at offset=6
报这个错误是指你的jar包或者class 的被编译的jdk版本比当前runtime的jdk版本高. 解决问题 1)如果是jar包,重新用jdk 1.6编译你的jar 包 2)如果是java文件或者项目 ...
- tomcat catalina.sh JAVA_OPTS参数说明与配置
JVM的博客: http://blog.csdn.net/java2000_wl/article/category/1249100 http://blog.csdn.net/cutesource/ar ...
- jQuery源码学习:Sizzle
本文所有讨论均基于jQuery版本3.1.1,官网http://jquery.com/. 一 简介 Sizzle是用javascript实现的CSS selector engine,官网见https: ...
- Humble Numbers(丑数) 超详解!
给定一个素数集合 S = { p[1],p[2],...,p[k] },大于 1 且素因子都属于 S 的数我们成为丑数(Humble Numbers or Ugly Numbers),记第 n 大的丑 ...