CodeCover初体验
国庆刚过完,闲来无事,就随便看看,顺便来了解下一些工具的使用,在工作中要用到的时候可以直接上手。
CodeCover是一个免费的白盒测试工具,主要测试代码、分支、循环、MC/DC 覆盖。支持为每个测试用例生成独立的报表,目前支持的语言有 Java 和 COBOL。本篇介绍CodeCover作为MyEclipse的插件时的使用。
官网:http://codecover.org/index.html
一. 下载安装
The CodeCover MyEclipse Plugin is installed using the standard Eclipse update mechanism:
- Start MyEclipse.
- From the main menu, select "Help", "Software updates", "Find and install...".

3. In the upcoming dialog, select "Search for new features to install" and click " "Next".

4. The list containing known update sites will be displayed. Create a new update site by clicking on "New Remote Site..." and enter the following information:
Name: CodeCover Update Site
URL: http://update.codecover.org/
Select the newly created site, if not already selected, and click "Finish". Eclipse will now contact the CodeCover update site; this might take a moment depending on your network connection.

5. In the next dialog, you will see the list of features found on the update site; for now, CodeCover consists of only one feature. Select it for installation and click "Next".

6. After the download has finished, Eclipse will ask you some questions about the license and installation, and prompt to restart the workbench. You should confirm the restart as not all CodeCover features are guaranteed to work if you simply click "Apply Changes".

Now CodeCover for MyEclipse is installed! You can proceed to the CodeCover Eclipse walkthrough to learn how you can use it.
二. 使用
1. Selecting the files to instrument
Open the Package Explorer view. Choose the Java Classes and Packages you want to instrument and open the context menu by right-clicking on the selected items. The menu item "Use For Coverage Measurement" allows you to toggle the instrumentation state of the selected items.

选中之后,此类前面就会有一个标记,如下图:

2.Enabling CodeCover for a Java project
Open the Properties of your project, e.g. by selecting the project in the Package Explorer and choosing the Properties menu item of the Project menu. Once the Properties are visible, select the CodeCover tab. This tab contains a checkbox which you use to enable/disable CodeCover for the project.

3.Running a Java project with CodeCover
Select the CodeCover tab and click on the "Run As"-"CodeCover Measurement " checkbox. Click the Run button to start the application.

Once the execution of the application is finished, the gathered coverage data will be shown in the Coverage View.
4. Test Sessions View

5. Coverage View

Last Two View come from Menu(Windows)-Show View-Other:CodeCover

最后再来工具查看对应的代码:

讲到这里,CodeCover已讲解完了,对它的基本使用已了解,待日后工作使用到的时候再去详细了解。
CodeCover初体验的更多相关文章
- .NET平台开源项目速览(15)文档数据库RavenDB-介绍与初体验
不知不觉,“.NET平台开源项目速览“系列文章已经15篇了,每一篇都非常受欢迎,可能技术水平不高,但足够入门了.虽然工作很忙,但还是会抽空把自己知道的,已经平时遇到的好的开源项目分享出来.今天就给大家 ...
- Xamarin+Prism开发详解四:简单Mac OS 虚拟机安装方法与Visual Studio for Mac 初体验
Mac OS 虚拟机安装方法 最近把自己的电脑升级了一下SSD固态硬盘,总算是有容量安装Mac 虚拟机了!经过心碎的安装探索,尝试了国内外的各种安装方法,最后在youtube上找到了一个好方法. 简单 ...
- Spring之初体验
Spring之初体验 Spring是一个轻量级的Java Web开发框架,以IoC(Inverse of Control 控制反转)和 ...
- Xamarin.iOS开发初体验
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA+CAIAAAA5/WfHAAAJrklEQVR4nO2c/VdTRxrH+wfdU84pW0
- 【腾讯Bugly干货分享】基于 Webpack & Vue & Vue-Router 的 SPA 初体验
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/57d13a57132ff21c38110186 导语 最近这几年的前端圈子,由于 ...
- 【Knockout.js 学习体验之旅】(1)ko初体验
前言 什么,你现在还在看knockout.js?这货都已经落后主流一千年了!赶紧去学Angular.React啊,再不赶紧的话,他们也要变out了哦.身旁的90后小伙伴,嘴里还塞着山东的狗不理大蒜包, ...
- 在同一个硬盘上安装多个 Linux 发行版及 Fedora 21 、Fedora 22 初体验
在同一个硬盘上安装多个 Linux 发行版 以前对多个 Linux 发行版的折腾主要是在虚拟机上完成.我的桌面电脑性能比较强大,玩玩虚拟机没啥问题,但是笔记本电脑就不行了.要在我的笔记本电脑上折腾多个 ...
- 百度EChart3初体验
由于项目需要在首页搞一个订单数量的走势图,经过多方查找,体验,感觉ECharts不错,封装的很细,我们只需要看自己需要那种类型的图表,搞定好自己的json数据就OK.至于说如何体现出来,官网的教程很详 ...
- Python导出Excel为Lua/Json/Xml实例教程(二):xlrd初体验
Python导出Excel为Lua/Json/Xml实例教程(二):xlrd初体验 相关链接: Python导出Excel为Lua/Json/Xml实例教程(一):初识Python Python导出E ...
随机推荐
- PHP调用SQL Server存储过程
一.安装SQL Server Driver for PHP 在微软官网上发现了这个东西,他提供了一套PHP对MS2005/2008操作的全新函数库,并且支持UTF8,作为PHP的扩展运行.看来 ...
- [js开源组件开发]js手机联动选择地区仿ios 开源git
js手机联动选择地区 前言:由于网上找到了一个mobiscrool,比较全,但是不开源,只能试用15天,正式版竟然要三千块钱,穷人只能自己动手,写了个只针对弹窗地区选择的. 本站点所有的资源均在git ...
- Sharepoint学习笔记—习题系列--70-573习题解析 -(Q100-Q103)
Question 100You create a Web Part.You need to display the number of visits to a SharePoint site coll ...
- 根据包名字符串跳转Activity
/** * 跳转到对应activity */ public void toActivity(Context context,String fullName) { if (className != nu ...
- Effective Java 阅读笔记——枚举和注解
30:用enum代替int常量 当需要一组固定常量的时候,应该使用enum代替int常量,除了对于手机登资源有限的设备应该酌情考虑enum的性能弱势之外. 31:用实例域代替序数 应该给enum添加i ...
- iOS 简单工厂模式
iOS 简单工厂模式 什么是简单工厂模式? 简单工厂模式中定义一个抽象类,抽象类中声明公共的特征及属性,抽象子类继承自抽象类,去实现具体的操作.工厂类根据外界需求,在工厂类中创建对应的抽象子类实例并传 ...
- SqlServer int型转varchar型 出现*号
今天调一个bug,错误提示执行语句 * 附近有语法错误,看了存储过程半天没啥反应,我就更本没有* .打印了一下语句发现 where Mor_Id=* 仔细一看set @sqlupdate+=' whe ...
- 在MAC平台下使用Eclipse出现了中文乱码
在Preference(偏好设置)中,搜索框中输入content找到Content Types,然后在text中找到并选中Java Source File, 然后在Defalut encoding输入 ...
- iOS支付宝集成时遇到的问题整理(2)
1.集成支付宝SDK编译报错#include<openssl/asn1.h>这一行 “openssl/asn1.h”file not found 解决方法:在BuildSetting 里 ...
- 换新 iPhone 前要做的 9 件事
iPhone 6 以及 iPhone 6 Plus 终于在众人的期盼下发布了,是不是很多朋友都跃跃欲试,想入手新的 iPhone 呢?若你手中持有旧款 iPhone 的话,其实更换成新机后,还有不少事 ...