Can Eclipse CodeCover be started later during execution, not from very stard of app?

19 views
Skip to first unread message

lufi...@redhat.com

unread,
Mar 9, 2018, 11:10:41 AM3/9/18
to JaCoCo and EclEmma Users
Hello (Привет!),

I'm an SWT/Eclipse developer, trying to fix a difficult Tree-editor drawing issue.

I have a situation like this:
A) <Boring Init Code>
B) <Problem Code that goes into JNI and back to java many times>

I need to figure how what lines are covered by the *problem* code, but not by Init.

I would like to do something like:

A) <Init Code>
- Turn on Cove Coverage
B) <Problem code>

Is this possible?


I've tried to sleep code and dump state, but it dumps everything up to problem code(A). When dumping again the "Init code" is included. (i.e we have A+B, but I need only B).

I've tried to do two runs (A+B) and only A and export via html. But the html have different time stamps so it's hard to tell the actual difference :-/. (I'm considering writing bash scripts to change that...)

Please advise.

Marc Hoffmann

unread,
Mar 9, 2018, 5:08:10 PM3/9/18
to jac...@googlegroups.com
Привет,

> I've tried to sleep code and dump state, but it dumps everything up to
> problem code(A). When dumping again the "Init code" is included. (i.e
> we have A+B, but I need only B).

In the coverage view check the "Reset on dump" option of the "Dump
Execution Data" drop down menu.

Then request a dump after boring A) -- you can probably ignore that.

If you create a dump after B) you will only see the executed code after
the previous dump.

Hope this helps.

Cheers,
-marc

lufi...@redhat.com

unread,
Mar 12, 2018, 4:37:59 PM3/12/18
to JaCoCo and EclEmma Users
Thank you, this is exactly what I was looking for!

Evgeny Mandrikov

unread,
Mar 12, 2018, 10:45:11 PM3/12/18
to JaCoCo and EclEmma Users


On Monday, March 12, 2018 at 9:37:59 PM UTC+1, lufi...@redhat.com wrote:
Thank you, this is exactly what I was looking for!

Salut, Leo!

This time Marc was faster than me with answer :D

Just in case, as addition, here is a link on recording from EclipseCon France 2017 where this demonstrated in action - https://youtu.be/BoiVrdlxB_M?list=PLZRu6Rvmk66uNscSsWjx9W6LiBSYFghW3&t=899

And blog entry, randomly picked from Google, about this: https://www.tasktop.com/blog/incremental-code-coverage-debugging-tool/

BTW all our presentations and videos about JaCoCo and EclEmma are listed on http://www.jacoco.org/research/index.html

Regards,
Evgeny

lufi...@redhat.com

unread,
Mar 13, 2018, 10:10:59 AM3/13/18
to JaCoCo and EclEmma Users
On Monday, March 12, 2018 at 10:45:11 PM UTC-4, Evgeny Mandrikov wrote:

> Just in case, as addition, here is a link on recording from EclipseCon France 2017 where this demonstrated in action - https://youtu.be/BoiVrdlxB_M?list=PLZRu6Rvmk66uNscSsWjx9W6LiBSYFghW3&t=899
>
> And blog entry, randomly picked from Google, about this: https://www.tasktop.com/blog/incremental-code-coverage-debugging-tool/
>
> Regards,
> Evgeny

Ah, interesting, thanks for the links!

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