[jbossts-issues] [JBoss JIRA] (JBTM-2553) Investigate the test with byteman do not work with the jacoco

Andrew Dinn (JIRA) issues at jboss.org
Wed Dec 2 05:54:00 EST 2015

    [ https://issues.jboss.org/browse/JBTM-2553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13136022#comment-13136022 ] 

Andrew Dinn commented on JBTM-2553:

Hi Tom,

One reason I know why this is so complex is that I found out that the latest version of Byteman is subject to the same issue i.e. it also shifts the start offset of this and parameter variables when it injects AT ENTRY (I have not yet found a test case for it but I think I will be able to reproduce the error Amos has seen by injecting multiple AT ENTRY rules into the same method). I have made several different attempts to fix the problem but so far none of them has worked. I'll continue to pursue this matter and let you know when I get something I can offer to the Jacoco team.

As you say, the simple workaround is indeed to disable Byteman tests when checking coverage. However, there is a better alternative -- modify the affected rules so that they reference this and/or parameters using the indexed parameter syntax $0, $1 etc. This is slightly less readable but does allow the tests can be included in the coverage analysis. giving a much more realistic assessment of test coverage for some parts of the code (e.g. crash recovery).

> Investigate the test with byteman do not work with the jacoco
> -------------------------------------------------------------
>                 Key: JBTM-2553
>                 URL: https://issues.jboss.org/browse/JBTM-2553
>             Project: JBoss Transaction Manager
>          Issue Type: Sub-task
>          Components: Testing
>            Reporter: Amos Feng
>            Assignee: Amos Feng
>             Fix For: 5.next

This message was sent by Atlassian JIRA

More information about the jbossts-issues mailing list