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的更多相关文章

  1. 软件测试:lab1.Junit and Eclemma

    软件测试:lab1.Junit and Eclemma Task: Install Junit(4.12), Hamcrest(1.3) with Eclipse Install Eclemma wi ...

  2. ST Lab1 junit test

    代码地址:  https://github.com/newff/st-lab1 Tasks: Install Junit(4.12), Hamcrest(1.3) with Eclipse Insta ...

  3. Junit,hamcrest和Eclemma安装及使用

    Junit和hamcrest下载及安装 下载地址 Junit      http://download.csdn.net/detail/luzle/6915487 Hamcrest  http://d ...

  4. 单元测试系列:如何使用JUnit+JaCoCo+EclEmma完成单元测试

    更多原创测试技术文章同步更新到微信公众号 :三国测,敬请扫码关注个人的微信号,感谢!   原文链接:http://www.cnblogs.com/zishi/p/6726664.html -----如 ...

  5. 使用junit和eclemma进行简单的代码测试

    1.Junit和Hamcrest的安装 可以在https://mvnrepository.com/上面下载所需要的Junit和Hamcrest的jar包,然后在项目中新建一个lib文件夹,将下载好的j ...

  6. 单元测试系列之一:如何使用JUnit、JaCoCo和EclEmma提高单元测试覆盖率

    更多原创测试技术文章同步更新到微信公众号 :三国测,敬请扫码关注个人的微信号,感谢!   原文链接:http://www.cnblogs.com/zishi/p/6726664.html -----如 ...

  7. 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- ...

  8. 软件测试Lab 1 Junit and Eclemma

    首先安装eclipse 然后下载hamcrest-core-1.3.jar,下载地址:http://mvnrepository.com/artifact/org.hamcrest/hamcrest-c ...

  9. JUNIT单元测试时统计代码的覆盖率工具eclemma安装

    EclEmma是Eclipse里的一个插件,安装简单,覆盖率显示直观.安装EclEmma.打开Eclipse,点击Help → Software Updates → Find and Install, ...

  10. 软件测试入门 1—— junit 单元测试

    一.实验主要内容: 1. 2.EclEmma安装 见: http://www.cnblogs.com/1995hxt/p/5291465.html 二.对与 Junit 安装,使用 maven管理项目 ...

随机推荐

  1. 画廊视图(Gallery)的功能和用法

    Gallery与Spinner组件有共同的父类:AbsSpinner,表明Gallery和Spinner是同一个列表框.它们之间的区别是Spinner显示的垂直的列表选择框,而Gallery显示的是一 ...

  2. 采用FirePHP调试PHP程序

    采用FirePHP调试PHP程序 FirePHP是什么? FirePHP是一个利用Firebug console栏输出调试信息方便程序调试.这一切只需要调用几个简单的函数. 他看起来是怎么个样子? 1 ...

  3. HTML5 & CSS3初学者指南(3) – HTML5新特性

    介绍 本文介绍了 HTML5 的一些新特性.主要包含以下几个方面: Web 存储 地理位置 拖放 服务器发送事件 Web存储 HTML5 Web 存储的设计与构想是一个更好的机制来存储客户端的网络数据 ...

  4. 分享一个基于thrift的java-rpc框架

    简单介绍 这是一个简单小巧的Java RPC框架,适用于Java平台内.为系统之间的交互提供了.高性能.低延迟的方案.适合在集群数量偏少的情况下使用(50台以下集群环境).当然.它也可以在大型集群环境 ...

  5. ArcGIS10.2直连PostgreSQL存在问题

    现象: 将下载到的libeay32.dll, libiconv-2.dll, libintl-8.dll, libpq.dll, ssleay32.dll文件拷贝到Desktop 安装目录的bin目录 ...

  6. Java错题

    加粗为正确答案,绿色为错选答案 1.对于以下代码: for ( int i=0; i<10; i++)  System.out.println(i); for循环后,i的值是多少? A.i不再存 ...

  7. 启动activity与使用Intent通信机制解析

    我们都知道,一个activity启动另一个activity最简单的方式就是使用startActivity方法: public void startActivity (Intent intent) 但是 ...

  8. 使用VS Code从零开始开发调试.NET Core 1.1

    使用VS Code 从零开始开发调试.NET Core 1.1.无需安装VS 2017 RC 即可开发.NET Core 1.1. .NET Core 1.1 发布也有一段时间了,最大的改动是从 pr ...

  9. 安装Oracle服务端后配置注册表与PL/SQL

    1.流程: 1.安装Oracle客户端(绿色版和安装版均可,建议安装在和Oracle服务端文件夹并行的路径下,例:E:\app\yginuo\product\11.2.0) 2.配置环境变量和注册表( ...

  10. 成小胖学习ActiveMQ·基础篇

    过了个春节,回到公司的成小胖变成了成大胖.但是你们千万别以为他那个大肚子里面装的都是肥肉,里面的墨水也多了不少嘞,毕竟成小胖利用春节的半个月时间专心学习并研究了 ActiveMQ,嘿嘿……这不,为了检 ...