Use JaCoCo with in-house testing framework

25 views
Skip to first unread message

Musab

unread,
Feb 4, 2020, 2:54:19 PM2/4/20
to JaCoCo and EclEmma Users
Hi, 
Thanks for developing such an impressive framework!

We use our own testing framework which relies on executing our own Ant Tasks to invoke APIs. An API requires specific XML input which is passed though the task's attribute, and spits out XML output. As you would imagine, it is normal for an API call to span over multiple classes and methods.

Can we use JaCoCo with our testing framework?
Can you point me to resources that can help me.

Thanks,

Marc Hoffmann

unread,
Feb 5, 2020, 3:41:26 PM2/5/20
to jac...@googlegroups.com
Sure, JaCoCo can be used for any code running on the JVM. Just attach the agent to the program under test.

Please see tasks “coverage” or “agent” in our documentation: https://www.jacoco.org/jacoco/trunk/doc/ant.html

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/3080b975-e52c-44c3-ac9d-1dd628b922c1%40googlegroups.com.

musab....@gmail.com

unread,
Feb 6, 2020, 10:21:29 AM2/6/20
to JaCoCo and EclEmma Users
Thanks Marc.
I tried to follow the example, but I am getting an error because the <coverage> task does not accept our <api> task which is used to invoke our APIs.
It seems that that it only accepts the tasks: java, junit, and testing.

Is there a way to go around this limitation?

Thanks


On Wednesday, February 5, 2020 at 3:41:26 PM UTC-5, Marc R. Hoffmann wrote:
Sure, JaCoCo can be used for any code running on the JVM. Just attach the agent to the program under test.

Please see tasks “coverage” or “agent” in our documentation: https://www.jacoco.org/jacoco/trunk/doc/ant.html

Regards,
-marc


On 4. Feb 2020, at 20:54, Musab <musab...@gmail.com> wrote:

Hi, 
Thanks for developing such an impressive framework!

We use our own testing framework which relies on executing our own Ant Tasks to invoke APIs. An API requires specific XML input which is passed though the task's attribute, and spits out XML output. As you would imagine, it is normal for an API call to span over multiple classes and methods.

Can we use JaCoCo with our testing framework?
Can you point me to resources that can help me.

Thanks,


--
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 jac...@googlegroups.com.

Marc Hoffmann

unread,
Feb 6, 2020, 11:58:03 AM2/6/20
to jac...@googlegroups.com
In this case you can use the agent task.

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/a0bf1503-bb0a-46ef-9c5c-347344254e11%40googlegroups.com.

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