3

It seems like both Cobertura and Emma are outdated now. They don't cope with Java 7 byte code. Running instrumented tests with Cobertura results in verification errors

java.lang.VerifyError: Expecting a stackmap frame at branch target 41 in method .....

A shame really because Cobertura really is cool and well-supported. For Java 6 byte code that is. But now I'm looking for a replacement. Preferably having both Maven and Jenkins support.

Are there any people in here using a code coverage library for Java 7 byte code ?

1
  • Are you focused on handling Java 7, or on open source? Commented Jul 26, 2012 at 19:08

1 Answer 1

2

I believe Jacoco will do the job

Sign up to request clarification or add additional context in comments.

4 Comments

That's quick ! :-) I was just looking to it. You are successfully using it in a Maven/Jenkins build ?
I mean a multi-module Maven project. Cobertura kept the modules strictly separated. As a result the integration tests were not measured correctly.
I don't use Maven, I'm afraid. There is a Jenkins plugin for it released a few weeks ago. I haven't got around to trying it yet, but I don't see any reason why it wouldn't work.
It looks like Jacoco is a nice alternative. Hence this is the answer I was looking for. BUT... in the meantime there's a workaround for this problem. Add -XX:-UseSplitVerifier to the jvm properties. It uses the previous version of the verifier.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.