Jacoco and MockitoJUnitRunner

164 views
Skip to first unread message

Kelly Goedert

unread,
Feb 10, 2015, 8:05:06 AM2/10/15
to jac...@googlegroups.com
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?


Marc R. Hoffmann

unread,
Feb 10, 2015, 3:04:17 PM2/10/15
to jac...@googlegroups.com
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
--
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+un...@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.


Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages