Hi,

there are two possible workarounds that might wirk in certain situations:

1) Make sure the JaCoCo agent is specified as the very first agent (before the mocking agents), if the mocking frameworks do work with agents.

2) Use JaCoCo with its offline instrumentation feature (not available in EclEmma thogh).

Regards,
-marc

On 2015-07-28 20:15, Jan Pešta wrote:
Hi,

I know this is quite old question.

Is there some solution which is usable?

If not, is there a way how to pass bytecode to jacoco just before
manipulation of Mockers/or other tools ?

I am playing with eclemma and I am unable to get registered class
transformer from jacoco.

Thanks,
Jan

Dne úterý 27. srpna 2013 20:55:49 UTC+2 Santhi Java napsal(a):

Thanks Marc,

I tried this solution, but now i could see the coverage only for
the classes which is using powemock. It is not covering for the
normal Junit and DBunit classes.

is this issue is going to fix in next releases.

Thanks again,
Santhi

On Fri, Aug 23, 2013 at 7:39 AM, Marc R. Hoffmann
<[email protected]> wrote:
Hi,

a possible workaround is to pre-instrument your class files on disk
(offline instrumentation). Evgeny prepared an example for JMockit,
it should also work for Powermock:


https://github.com/Godin/jacoco-experiments/tree/master/jacoco-jmockit-example
[1]

Cheers,
-marc

On 22.08.13 23:49, [email protected] wrote:
On Sunday, June 16, 2013 12:08:20 PM UTC-7, Shaykin Anton wrote:
This is a well-known issue, which makes it impossible to use such a
great tool in our project.

I know this has been previously discussed here and here and in many
other places. Just as a reminder, "JaCoCo uses a hashcode of the
class definition for class identity" that's why it can't determine
coverage on classes which were instrumented by PowerMock.

I also know, that the official answer is "This is a known limitation
we can't currently do anything about". Pardon for being persistent,
but maybe I can give you a hand in fixing this problem?

I am also facing this issue(Jacoco and Powermock). Please let me
know if somebody had solution.

--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out [2].

 --
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/798ba88a-2c53-423e-b2d8-d4b7187d0212%40googlegroups.com
[3].
For more options, visit https://groups.google.com/d/optout [4].


Links:
------
[1]
https://github.com/Godin/jacoco-experiments/tree/master/jacoco-jmockit-example
[2] https://groups.google.com/groups/opt_out
[3]
https://groups.google.com/d/msgid/jacoco/798ba88a-2c53-423e-b2d8-d4b7187d0212%40googlegroups.com?utm_medium=email&utm_source=footer
[4] 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/0d8599acfa18112dfeca3fb0b8fedff5%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to