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. iOS 之 UICollectionView

    1. iOS 之 UICollectionView 之 原理介绍 2. iOS 之 UICollectionView 之 开发步骤 之 OC 3. iOS 之 UICollectionView 之 开 ...

  2. 采用FirePHP调试PHP程序

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

  3. WebRTC VoiceEngine使用简单Demo

    Google收购的GIPS公司的音频处理技术是很牛的,现在开源了,这么好的技术应该拿来用的,这里就简单的介绍一下怎样使用VoiceEngine,欢迎大家拍砖指导. WebRTC相关的VideoEngi ...

  4. Vue.js自定义指令的用法与实例

    市面上大多数关于Vue.js自定义指令的文章都在讲语法,很少讲实际的应用场景和用例,以致于即便明白了怎么写,也不知道怎么用.本文不讲语法,就讲自定义指令的用法. 自定义指令是用来操作DOM的.尽管Vu ...

  5. HDU5882

    Balanced Game Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tot ...

  6. ECMAScript 6 笔记(三)

    ES6中的基本扩展 一.函数的扩展 1. 函数参数的默认值 ES6 允许为函数的参数设置默认值,即直接写在参数定义的后面. function log(x, y = 'World') { console ...

  7. We Chall-Training: Stegano I-Writeup

    MarkdownPad Document html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,ab ...

  8. 如何用CSS进行网页布局---学习总结

    页面布局:对页面的文字.图形或表格进行格式设置.包括字体.字号.颜色纸张大小和方向以及页边距等 页面布局分为4种: 一栏布局 两栏布局 三栏布局 混合布局 灵活利用float.position对页面进 ...

  9. MongoDB基础之八 备份与恢复

    Mongodb导出与导入 1: 导入/导出可以操作的是本地的mongodb服务器,也可以是远程的.所以,都有如下通用选项:-h host 主机--port port 端口-u username 用户名 ...

  10. ECJTUACM16 Winter vacation training #4 题解&源码

    A......................................................................................... 题目链接→Code ...