Hi Jan,
correct, bytecode is processed by Java agents when define class is
called -- so probably after you do the manipulation. So the only option
left is to use offline instrumentation, i.e. instrument the classes on
disk before you execute your tests.
Regards,
-marc
On 2015-07-30 16:53, Jan Pešta wrote:
Hi,
Thanks for the answer, but it doesn't help.
Think is that I am manipulating byte code in Junits by my self, and I
would like to call jacoco, before my, because when I pass bytecode to
define method (which ends in jacoco) it must be manipulated already.
I was thinking if there is some non native implementation, which is
able to provide registered ClassFileTransformer and I can pass byte
code to them before my manipulation.
Thanks,
Jan
Dne čtvrtek 30. července 2015 16:25:14 UTC+2 Marc R. Hoffmann
napsal(a):
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]
[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] [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]
[3].
For more options, visit https://groups.google.com/d/optout [4]
[4].
Links:
------
[1]
https://github.com/Godin/jacoco-experiments/tree/master/jacoco-jmockit-example
[1]
[2] https://groups.google.com/groups/opt_out [2]
[3]
https://groups.google.com/d/msgid/jacoco/798ba88a-2c53-423e-b2d8-d4b7187d0212%40googlegroups.com?utm_medium=email&utm_source=footer
[5]
[4] https://groups.google.com/d/optout [4]
--
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/1ae73837-9cff-4ae1-8117-c3c68b8d0a9c%40googlegroups.com
[6].
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
[4] https://groups.google.com/d/optout
[5]
https://groups.google.com/d/msgid/jacoco/798ba88a-2c53-423e-b2d8-d4b7187d0212%40googlegroups.com?utm_medium=email&utm_source=footer
[6]
https://groups.google.com/d/msgid/jacoco/1ae73837-9cff-4ae1-8117-c3c68b8d0a9c%40googlegroups.com?utm_medium=email&utm_source=footer
--
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/6eea9a1e9e6b785c035d0d1fc812d3d3%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.