select active session in eclemma programmatically

39 views
Skip to first unread message

Mario Ackerl

unread,
Oct 5, 2016, 6:52:05 AM10/5/16
to JaCoCo and EclEmma Users
Hi,

is there a way/API to programmatically switch the selected session in eclemma? I supposed that activateSession (from ISessionManager) should do that, but this does not work as I expected. 

Thanks in advance

Mario

Marc Hoffmann

unread,
Oct 5, 2016, 7:19:10 AM10/5/16
to jac...@googlegroups.com
Hi Mario,

this is the API to activate a new Session. Note however that coverage
for the Java elements in scope is calculated as a background job. So
results are not available when this method returns.

Maybe cou can get a bit more specific about "this does not work as I
expected".

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/ddb0b399-705b-4251-a1ef-a0b786761765%40googlegroups.com
> [1].
> For more options, visit https://groups.google.com/d/optout.
>
>
> Links:
> ------
> [1]
> https://groups.google.com/d/msgid/jacoco/ddb0b399-705b-4251-a1ef-a0b786761765%40googlegroups.com?utm_medium=email&utm_source=footer

Mario Ackerl

unread,
Oct 5, 2016, 9:03:20 AM10/5/16
to JaCoCo and EclEmma Users
Hi Marc,

I try to explain it with a pic: https://postimg.org/image/fbn7lr3mr/ ( result at the end of a test run -> no coverage session selected - coverage results from a deleted session are shown)
We have a coverage session for every test method. At the end of a suite I want to do some magic (add some summarized sessions for example). I also delete a few sessions. Unfortunately sometimes no session is selected as shown in the screenshot (active session deleted). I therefore want to select the active session for the user (developer), so that the active session at the end of a testsuite is the summarized session. Is there a way to do that with the API? 

Regards,

Mario

Marc R. Hoffmann

unread,
Oct 5, 2016, 11:13:24 AM10/5/16
to jac...@googlegroups.com
Hi Mario,

use ISessionManager. activateSession(ICoverageSession) to activate the session after you have done magic.

Regards,
-marc

For more options, visit https://groups.google.com/d/optout.


-- 
Marc Hoffmann
hoff...@mountainminds.com
_______________________________________________
Mountainminds GmbH & Co. KG

Nussbaumstr. 4 * 80336 Muenchen * Germany 
Phone/Fax +49-700-68664637 * 0700-MTNMINDS

Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann

Mario Ackerl

unread,
Oct 6, 2016, 1:18:00 AM10/6/16
to JaCoCo and EclEmma Users
Hi Marc,

thank you. Finally found my mistake. I should not remove the added session to early in ISessionListener->sessionAdded ... when I do that in ISessionListener->sessionActivated the activation of another session works like a charm.

Regards,

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