EMMA: 免费java代码测试覆盖工具

From:http://emma.sourceforge.net/

EMMA: a free Java code coverage tool

 

Code coverage for free: a basic freedom?

 
     

Until recently, the world of Java development had been plagued by an absurd discrepancy: Java developers had excellent free IDEs, free compilers, free test frameworks but had to rely on code coverage tools that charged an arm and a leg in license fees. As a Java pro, I would like to use the same free coverage tool regardless of whether it is a massive commercial project at work or a small fun project at home. I‘ve created EMMA to be that tool.

EMMA is an open-source toolkit for measuring and reporting Java code coverage. EMMA distinguishes itself from other tools by going after a unique feature combination: support for large-scale enterprise software development while keeping individual developer‘s work fast and iterative. Every developer on your team can now get code coverage for free and they can get it fast!

Chances are, you‘ve come here already knowing what coverage is all about and are, in fact, wondering what EMMA offers and why it is worth checking out. Explore the rest of this site to see why.

 

EMMA features at a glance:

 
     
  • EMMA can instrument classes for coverage either offline (before they are loaded) or on the fly (using an instrumenting application classloader).
  • Supported coverage types: class, method, line, basic block. EMMA can detect when a single source code line is covered only partially.
  • Coverage stats are aggregated at method, class, package, and "all classes" levels.
  • Output report types: plain text, HTML, XML. All report types support drill-down, to a user-controlled detail depth. The HTML report supports source code linking.
  • Output reports can highlight items with coverage levels below user-provided thresholds.
  • Coverage data obtained in different instrumentation or test runs can be merged together.
  • NEW in v2.1

    Starting with build 2.1.5320 it is possible to dump or reset coverage data remotely and without a JVM exit.

  • EMMA does not require access to the source code and degrades gracefully with decreasing amount of debug information available in the input classes.
  • EMMA can instrument individial .class files or entire .jars (in place, if desired). Efficient coverage subset filtering is possible, too.
  • Makefile and ANT build integration are supported on equal footing.
  • EMMA is quite fast: the runtime overhead of added instrumentation is small (5-20%) and the bytecode instrumentor itself is very fast (mostly limited by file I/O speed). Memory overhead is a few hundred bytes per Java class.
  • EMMA is 100% pure Java, has no external library dependencies, and works in any Java 2 JVM (even 1.2.x).

More on EMMA features can be found in the FAQ.

 

Where to go from here?

时间: 2024-10-06 11:07:20

EMMA: 免费java代码测试覆盖工具的相关文章

Android Layout Binder(在线将XML中View find出来,生成java代码的工具)

废话不多说,这是地址:http://android.lineten.net/layout.php. 有图有真相,例如: 你的XML假如是这样: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fil

Java代码检测工具

开发软件时,我的主要目标之一是:要么防止将缺陷引入代码库,要么限制缺陷的生存期:换言之,要尽早找到缺陷.很显然,越是了解如何编写更好的代码以及如何有效测试软件,就越能及早地捕捉到缺陷.我也很想要一张能发现潜在缺陷的安全之网. 得出了这样的结论:将检验工具集成到构建过程(例如,使用 Ant 或 Maven)中,能够建立起一种寻找潜在缺陷的方法.尽管这种方法使一致性成为可能并超越了 IDE,但它也有一点反作用.必须在本地构建软件或等待 Continuous Integration 构建的运行.如果使

java 代码分析工具——JDepend

最近学习Mybatis的官方文档,看到了[项目文档]一节有很多内容没有见过,做个笔记,理解一下. 百科上的介绍,我竟然都看懂了,那就不找其他地方的资料了. JDepend 一个开放源代码的可以用来评价Java程序质量的优秀工具(定义),它遍历Java class的文件目录,以Java包(package)为单位,为每一个包/类自动生成 包的依赖程度(怎么做的),稳定性,可靠度等的评价报告,根据这些报告,我们可以得到包或类之间的依赖关系,并分析出包的稳定程度,抽象程度,是否存在循环依赖关系 等(用途

44个JAVA代码质量管理工具(转)

1. CodePro AnalytixIt’s a great tool (Eclipse plugin) for improving software quality. It has the next key features: Code Analysis, JUnit Test Generation, JUnit Test Editor, Similar Code Analysis, Metrics, Code Coverage and Dependency Analysis.2. PMDI

三个 DAL 相关的Java代码小工具

最近在做 DAL (Data Access Layer 数据访问层) 的服务化,发现有不少地方是人工编写比较繁琐的,因此写了几个小工具来完成. 1.  从 DAO 类自动生成 CoreService 类, CoreService 直接调用 DAO 类 思路: 通过正则表达式解析方法参数, 使用正则替换及源 DAO 文件来生成 CoreService 源文件. package zzz.study.utils; import cc.lovesq.dao.CreativeDAO; import jav

阿里java代码检测工具p3c

阿里在杭州云栖大会上,正式发布众所期待的<阿里巴巴Java开发规约>扫描插件!该插件由阿里巴巴P3C项目组研发.这个项目组是阿里巴巴开发爱好者自发组织形成的虚拟项目组,把<阿里巴巴Java开发规约>强制条目转化成自动化插件,并实现部分的自动编程.插件的下载地址:https://github.com/alibaba/p3c 或者在Github直接搜索p3c插件有哪些功能?为了让开发者更加方便.快速将规范推动并实行起来,阿里基于手册内容,研发了一套自动化的IDE检测插件(IDEA.Ec

java代码分析及分析工具

java代码分析及分析工具 一个项目从搭建开始,开发的初期往往思路比较清晰,代码也比较清晰.随着时间的推移,业务越来越复杂.代码也就面临着耦合,冗余,甚至杂乱,到最后谁都不敢碰. 作为一个互联网电子商务网站的业务支撑系统,业务复杂不言而喻.从09年开始一直沿用到现在,中间代码经过了多少人的手,留下了多少的坑,已经记不清楚了,谁也说不清了. 代码的维护成本越来越高.代码已经急需做调整和改善.最近项目组专门设立了一个小组,利用业余时间做代码分析的工作,目标对核心代码进行分析并进行设计重构. 代码分析

四种java代码静态检查工具

[转载]常用 Java 静态代码分析工具的分析与比较 转载自 开源中国社区 http://www.oschina.net/question/129540_23043 1月16日厦门 OSC 源创会火热报名中,奖品多多哦 »   简介: 本文首先介绍了静态代码分析的基本概念及主要技术,随后分别介绍了现有 4 种主流 Java 静态代码分析工具 (Checkstyle,FindBugs,PMD,Jtest),最后从功能.特性等方面对它们进行分析和比较,希望能够帮助 Java 软件开发人员了解静态代码

常用 Java 静态代码分析工具的分析与比较

转载自: http://www.oschina.net/question/129540_23043 简介: 本文首先介绍了静态代码分析的基本概念及主要技术,随后分别介绍了现有 4 种主流 Java 静态代码分析工具 (Checkstyle,FindBugs,PMD,Jtest),最后从功能.特性等方面对它们进行分析和比较,希望能够帮助 Java 软件开发人员了解静态代码分析工具,并选择合适的工具应用到软件开发中. 引言 在 Java 软件开发过程中,开发团队往往要花费大量的时间和精力发现并修改代