emma

How do I generate Emma code coverage reports using Ant?

How do I setup an Ant task to generate Emma code coverage reports? ...

Why is a method call shown as not covered when the code within the method is covered with emma?

I am writing a unit test to check that a private method will close a stream. The unit test calls methodB and the variable something is null The unit test doesn't mock the class on test The private method is within a public method that I am calling. Using emma in eclipse (via the eclemma plugin) the method call is displayed as not bei...

How far do you take code coverage?

I've recently started using code coverage tools (particularily Emma and EclEmma), and I really like the view that it gives me as to the completeness of my unit tests - and the ability to see what areas of the code my unit tests aren't hitting at all. I currently work in an organization that doesn't do a lot of unit testing, and I plan on...

Getting ClassFormatError with EMMA?

I'm trying to generate code coverage reports with EMMA using tests of which some use JMockit as a mocking framework. For the most part, it works, but a few of my tests crash with a ClassFormatError, like so: java.lang.ClassFormatError at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method) at sun.instrument.Instrum...

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 measuring coverage as the .emma files seem to be generating and merging correctly. The re...

EMMA won't cover one of my projects

Hi, I have an issue with EMMA where it is correctly covering all my various Java projects except one. I am puzzled as to why this occurs as the ANT script appears to be correct. The following expected output is given: [echo] c:\cc_local_home\emmadata\ProjectName [instr] processing instrumentation path ... [instr] instrumentation path ...

Setting a Coverage Threshold using Emma and Ant

I'm using Emma in my ant build to perform coverage reporting. For those that have used Emma, is there a way to get the build to fail if the line coverage (or any type of coverage stat) does not meet a particular threshold? e.g. if the line coverage is not 100% ...

Emma doesn't provide code coverage across projects

Hi guys, I was wondering if any of you EMMA users have encountered this issue. Basically I have multiple projects each with different build.xml ANT scripts that are all called from one main ANT script individually. The code is covered appropriately but when a JUnit method calls another method in a different project, that external metho...

How can I make Cobertura/Emma play nice with an Eclipse application?

My company is in the middle of upgrading our build system to use Buckminster (which has gone well). Naturally the managers would like it if we could automatically generate some of the metrics they use for code while we're at it - one of these metrics is coverage for the unit tests. The previous build, which was PDE-based, resulted in a ...

Emma Coverage metadata

Hi, I'm trying to understand Emma the code coverage tool and it seems ok till the moment I need the metadata, for example which line exactly is left out or is covered. I need this information for my own application but can't get to it. The xml report doesn't provide it. I would be thankful if anybody can help. ...

Emma doesn't embed source code to html report

Hello, I have a problem with Ant and Emma a code coverage plugin, it makes report, but without source code. I got following code in my build.xml init emma <taskdef resource="emma_ant.properties" /> <path id="run.classpath"> <pathelement location="${instr}" /> <path refid="build.classpath"/> <pat...

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 error: com.logstorage.engine.sensor.SensorManagerTest.setUpBeforeClass(SensorManagerTest.java:98) java.lang.ClassFormatError ...

How can I remove/filter/ignore some package from Emma (code coverage)

Hi all... I`m trying to remove some package from my report and having trouble. Could some one give me some help? I'm using EMMA in my ant process. <!-- Generate the emma report both in xml and html --> <emma>   <report     sourcepath="${build.report.src}"     metrics="class:${coverage.classes.min},method:${coverage.methods.min}">  ...

emma maven plugin code highlighting

is it possible to have the output html reports have highlighting where code was covered in a maven build? I know you can in standalone emma and with ant, but I haven't yet figured out how to do this with maven and emma. Thanks. Jeff ...

Does emma support concurrent writing to session files by multiple processes?

If I instrument two jars in emma, point them to the same emma session file, and then run them concurrently (e.g., a client and a server), should I expect things to work or fail miserably? The jars are building out of common source, so I don't expect problems with the metadata. I didn't see anything about this in documentation, so if it ...

Java code coverage in Hudson

I'm migrating a couple of projects from an ant build to a maven one. The build server is , and will remain, Hudson. I've been having trouble recording code coverage in hudson with cobertura due to the tests run and recorded twice problem. The project is multi-module and it would be nice, although not required, to have an aggregated out...

Can I merge Emma coverage data from unit and integration test targets?

We have our TeamCity builds set up using a build chain, so that our unit tests and and integration tests can run in parallel when triggered by a commit: Build Chain - dependant on: Unit tests Integration tests I am looking for a way that we can combine/merge the coverage data generated by the unit and integration tests in the build...

How to change Ant script with EMMA code-coverage so it can find runtime coverage data?

I have following script: <?xml version="1.0" encoding="UTF-8"?> <taskdef resource="emma_ant.properties"> <classpath> <pathelement location="lib/emma.jar" /> <pathelement location="lib/emma_ant.jar" /> </classpath> </taskdef> <target name="compile"> <mkdir dir="build"/> <!-- vytvori adresar bu...

Using emma : Method is getting called but in Code coverage it shows 0% for that file.

Hi, I am using Emma for code-coverage for my project. In my JUnit test case, I am calling a method but in code coverage report, it shows no coverage for that method which is getting called from testCase. ...

Can we generate multiple coverage reports using Hudson Emma plugin

We run both unit (junit) and system (fit) tests on instrumented code in our build. The consolidated coverage report for both is generated as part of the build itself. We then feed the unit test coverage report to the Hudson Emma plugin, configure benchmark numbers and things work nicely. Is it possible to also feed in the system test c...