Questions tagged [emma]

EMMA is an open-source toolkit that measures and reports the percentage of Java code covered by unit tests.

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.
  • 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 individual .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).

Useful Links:

274 questions
5
votes
1 answer

Building android projects with TeamCity - testing and code coverage issues

I'm working on a project consisting of both .NET code and android java projects. We're trying to get both types of projects working in one TeamCity environment. The .NET projects are being tested through some NUnit projects, and we use DotCover to…
5
votes
2 answers

How to get Sonar to export test stats?

I have the following Sonar Ant target defined:
Noel Yap
  • 18,822
  • 21
  • 92
  • 144
5
votes
1 answer

Scala ,sbt and emma or Cobertura

I want to use code coverage in Scala project,Simple Build Tool used as a build tool.What is the best one to use in this project. (I'm new to these technologies.) Any one can tell me how to configure code coverage in my project.If you could provide…
123Ex
  • 237
  • 2
  • 5
  • 9
5
votes
1 answer

Missing +/- setting for VM option 'UseSplitVerifier'

I am running the emma code coverage tool in my system by using the below command, D:\DeadLockDetection\DDinDOS>java -XX:UseSplitVerifier -cp emma.jar emmarun -jar process-3-1.0.jar The below error is comming on running the above command, Missing…
Balayesu Chilakalapudi
  • 1,386
  • 3
  • 19
  • 43
5
votes
4 answers

EMMA coverage tool not displaying line-by-line coverage

I am using the EMMA tool for code coverage yet despite my best efforts, EMMA is refusing to see the original .java files and generate coverage on a line-by-line basis. We are using ANT to build the code and debug is set to true. I know that EMMA is…
del
5
votes
3 answers

Can fully covered code have an EclEmma coverage rating of less than 100%?

I just wrote some simple sample code to make sure that I had EclEmma installed correctly. I'm not getting 100% coverage, and I don't understand why. The highlighting implies that it has to do with the class name. Here's my code, with corresponding…
Pops
  • 30,199
  • 37
  • 136
  • 151
4
votes
2 answers

Emma coverage with Powermock

We have emma configured in our project which generates the coverage report. Whole setup was working fine until I introducted PowerMock to mock some of the static methods. When I annotate a class with @RunWith(PowerMockRunner.class), emma tries to…
Abhijith Prabhakar
  • 1,325
  • 3
  • 12
  • 24
4
votes
2 answers

Emma code coverage for a lib on Android

I currently have some unit tests for an Android app, which makes calls to a library jar file. I would like to see the code coverage for the jar, but when I run ant emma and look at the coverage.html, it only reports on the coverage of the app…
nicobatu
  • 1,377
  • 3
  • 15
  • 34
4
votes
1 answer

Run All the Tests

Is there a way to run all the tests in multiple eclipse projects? I have a maven multi module project and want to use emma to show me code, that is not covered by any tests, not matter in which submodule it lies. So my idea is to have a single…
KarlsFriend
  • 745
  • 1
  • 4
  • 17
4
votes
4 answers

ClassFormatError using JMockit with EMMA

I am trying to use EMMA to measure coverage of some JUnit tests that use JMockit. But when I try to run the JMockit tests after instrumenting with EMMA, about a quarter of the tests fail with the following…
Chris B
  • 9,149
  • 4
  • 32
  • 38
4
votes
1 answer

EclEmma plugin with TestNG plugin and multiple eclipse projects

I have ten maven modules, which are separate eclipse projects. All of them has testNG tests. When I trying to create emma coverage configuration for this it allows choose only one particular project. So, to receive the whole picture of main project…
javagirl
  • 1,635
  • 6
  • 27
  • 43
4
votes
2 answers

Android app code coverage for manual testing

I am looking for a way to get EMMA code coverage with manual test. I mean, i don't want to write any unit test cases using the android test framework, instead i am looking for a way to instrument my android app source code and test manually and at…
user864309
  • 226
  • 2
  • 11
4
votes
1 answer

Emma runtime controller doesnt start

My primary goal is to get code coverage using EMMA on a running web application using CTL coverage.get. I use emma maven plugin. So, I deploy my web application with instrumented code. In tomcat log is see: EMMA: collecting runtime coverage data…
ilu
  • 133
  • 2
  • 7
4
votes
1 answer

Measuring integration test coverage with Maven

The followings are ok now: I have a multi-module project in maven with EJB and WAR projects I want to use JMeter (and later selenium) for integration testing. I can run both from Maven. The JMeter plan is ready, I run it with Chronos maven…
Gábor Lipták
  • 9,646
  • 2
  • 59
  • 113
4
votes
4 answers

Java : Which Code Coverage tool to use?

Here is what I want to do: 1) A running application has been instrumented. The byte code is clean - means that the tracing info should be added on the byte code level. 2) The running application might run for days or weeks. I want to have a trace…
user400365
  • 41
  • 1
1 2
3
18 19