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 ...
随机推荐
- spring boot学习笔记
spring boot 是什么 Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程. spring boot采用了“约定优于配置” ...
- [Tool] 使用Visual Studio Code开发TypeScript
[Tool] 使用Visual Studio Code开发TypeScript 注意 依照本篇操作步骤实作,就可以在「Windows」.「OS X」操作系统上,使用Visual Studio Code ...
- JSON详解 .net
之前json掌握的不好,浪费了好多时间在查找一些json有关的转换问题,我所知道的方法只有把json序列化和反序列化一下,但是太麻烦了我觉得,所以就在找一些更简单又方便使用的方法.也许这个会有用吧,所 ...
- Mvc项目架构分享之项目扩展
Mvc项目架构分享之项目扩展 Contents 系列一[架构概览] 0.项目简介 1.项目解决方案分层方案 2.所用到的技术 3.项目引用关系 系列二[架构搭建初步] 4.项目架构各部分解析 5.项目 ...
- .NET破解之谷歌地图下载助手-睿智版
今天在整理文件是,发现手上还有个谷歌地图下载助手-睿智版,是C#写的.查了它们的官网,好像很久没有更新了,可能是垮了吧. 我把.NET程序破解分为三个阶段:软件分析,从软件使用上来分析功能的限制,即为 ...
- 【转】一个非常常见但容易被忽略的c++问题——用IPML模式可以解决
pimpl (the pointer-to-implementation idiom)手法在 C++ 里已是“高手”们广泛运用的成熟方法之一,它的优点很多,诸如降低编译依赖.提高重编译速度之类的工具性 ...
- iOS开发之网络编程--使用NSURLConnection实现文件上传
前言:使用NSURLConnection实现文件上传有点繁琐. 本文并没有介绍使用第三方框架上传文件. 正文: 这里先提供用于编码测试的接口:http://120.25.226.186:3281 ...
- iOS之UI--Quartz2D的入门应用--重绘下载圆形进度条
*:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...
- OOD沉思录 --- 类和对象的关系 --- 包含关系1
4.5 如果类包含另一个类的对象,那么包含类应当向被包含的对象发送消息(调用方法). 也就是说,所有的包含关系都应当是使用关系. 如果不是这样,那么包含的类有什么用处呢?当然,面向过程的开发人员会想 ...
- Count and Say
Count and Say https://leetcode.com/problems/count-and-say/ The count-and-say sequence is the sequenc ...