Discussion:
[java code coverage] Jacoco and MockitoJUnitRunner
(too old to reply)
Kelly Goedert
2015-02-10 13:05:06 UTC
Permalink
Hi,

apparently when I use @RunWith(MockitoJUnitRunner.class) and its annotation
@InjectMocks, jacoco does not produce the correct reports. It shows me a
warning in the maven output like this:

. For report generation the same class files must be used as at runtime.
[WARNING] Execution data for class MyClass does not match.

Is this assumption correct?
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/5d0716a7-83a0-4b23-874b-56a8d797a0a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marc R. Hoffmann
2015-02-10 20:04:16 UTC
Permalink
Hi,

JaCoCo does not play well with other tools that modify bytecode
on-the-fly. JaCoCo needs to see the same classes at runtime than at
reporting time (as the warning text says).

A possible (but not really recommended) workaround is to use JaCoCo
offline instrumentation.

Regards,
-marc
Post by Kelly Goedert
Hi,
. For report generation the same class files must be used as at runtime.
[WARNING] Execution data for class MyClass does not match.
Is this assumption correct?
--
You received this message because you are subscribed to the Google
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/5d0716a7-83a0-4b23-874b-56a8d797a0a8%40googlegroups.com
<https://groups.google.com/d/msgid/jacoco/5d0716a7-83a0-4b23-874b-56a8d797a0a8%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/54DA6440.6040005%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.
Loading...