You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by MMA_EDFX <ma...@edifixio.com> on 2016/06/24 07:37:35 UTC

TomEE Code coverage with JACOCO (jacoco.exec file does not create)

Hello,

I have attached jacoco agent in catalina.bat.

set
JACOCO_OPTS=-javaagent:c:/tmp/lib/jacocoagent.jar=destfile=c:/temp/jacoco.exec,append=true,includes=com.mycompany.*
set JAVA_OPTS=%JAVA_OPTS% %ACTIVEMQ_OPTS% %JACOCO_OPTS%

But the jacoco.exec never created while startup or shutdown.

How to create the jacoco.exec file in TomEE? Is there anything I am missing?



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-Code-coverage-with-JACOCO-jacoco-exec-file-does-not-create-tp4679046.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: TomEE Code coverage with JACOCO (jacoco.exec file does not create)

Posted by ravi <sa...@yahoo.co.in>.
Hi,

I have a sample project on git hub (Uses tomee
embedded+arquillian-tomee-embedded+jacacoo for code coverage)
https://github.com/Ravisankar-Challa/tomee_embedded

If you are using arquillian-tomee-remote I guess you have to add
arquillian-jacoco ro get code coverage 

<dependency>
    <groupId>org.jboss.arquillian.extension</groupId>
    <artifactId>arquillian-jacoco</artifactId>
    <version>1.0.0.Alpha8</version>
</dependency>

Thanks,
Ravi



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-Code-coverage-with-JACOCO-jacoco-exec-file-does-not-create-tp4679048p4679060.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: TomEE Code coverage with JACOCO (jacoco.exec file does not create)

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

Would be more relevant to ask on jacoco lists since it is a pure jacoco
question.

Easy way is to move forward is to (remote) debug in jacoco agent and check
it is:

1. setup (PreMain class)
2. used (
https://github.com/jacoco/jacoco/blob/164485a8da42d834df4b5202079b2f2b2ac28b26/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/CoverageTransformer.java#L115
)





Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-06-24 9:37 GMT+02:00 MMA_EDFX <ma...@edifixio.com>:

> Hello,
>
> I have attached jacoco agent in catalina.bat.
>
> set
>
> JACOCO_OPTS=-javaagent:c:/tmp/lib/jacocoagent.jar=destfile=c:/temp/jacoco.exec,append=true,includes=com.mycompany.*
> set JAVA_OPTS=%JAVA_OPTS% %ACTIVEMQ_OPTS% %JACOCO_OPTS%
>
> But the jacoco.exec never created while startup or shutdown.
>
> How to create the jacoco.exec file in TomEE? Is there anything I am
> missing?
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Code-coverage-with-JACOCO-jacoco-exec-file-does-not-create-tp4679046.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>