Jacoco Debug And Development Questions

89 views
Skip to first unread message

Lu Junliang

unread,
Sep 20, 2023, 9:42:22 AM9/20/23
to JaCoCo and EclEmma Users
Hi guys,

Before elobrating my question, please allow me introduce some background about my requirements

i want to combine Jacoco coverage dections with test case in order to make testing more accurate.
So I want to change one-dimensional boolean probes records to two-dimensional probes records, such as Map<String, boolean[]> , it can find the accurate
test case which cover the code.

i've clone jacoco from github to IDEA, how can i start to debug jacoco project and do some development?
 want to knows how probes init and insert, helping complete my requirements

So any tips?

Thx

junliang

Marc Hoffmann

unread,
Sep 20, 2023, 3:59:25 PM9/20/23
to JaCoCo and EclEmma Users
Hi junliang,

while it should be possible to do JaCoCo development with IntelliJ the repository has all configuration files für Eclipse. So if you import the project into Eclipse with M2E installed everything should be set for development.

JaCoCo is fully unit tested. So for every piece of code you can play with the respective tests to understand the behaviour.

Also documentation contains some chapters about the architecture and some implementation details:


What you want to do has been implemented before without modifying JaCoCo: The approach was to hook into test framework (e.g. JUnit) and use JaCoCo’s runtime API to dump execution data after every test. Not that in any case the amount created data is enormous.

Best 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/346fcc5b-b015-4509-ab7d-acaafa2b9efcn%40googlegroups.com.

Lu Junliang

unread,
Sep 20, 2023, 10:59:20 PM9/20/23
to jac...@googlegroups.com
Hi Hoffmann,

Thank you for taking time to reply. i will try to develop on Eclipse.

By the way, maybe i didn't explain "test case" clearly before. In my project, test case are created and stored in automated testing platform, which will be
used to do functional testing.

when application run with jacoco agent, whether auto testing request from quality assurance mates or regular request  from others  arrives will change specific probes status, so i want to distinguish these request to make auto testing coverage more credible.

Thank you again for your reply
Best wishes

You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/guMiC5leLsc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/6DD3CECC-25DF-42CF-8D67-0E56FF18D1B5%40mountainminds.com.

Hunk Huang

unread,
Sep 21, 2023, 12:36:52 AM9/21/23
to jac...@googlegroups.com
I did this recently with Marc's solution, You don't need to change Jacoco itself, instead create session ids per test and dump the data. 

Only limitation here with this solution is that we can't run tests in parallel.  

I'm not sure anyone has other solutions which can solve the parallel run problem.

Thanks,
Hunk 

Reply all
Reply to author
Forward
0 new messages