My code uses reflection. Why does it fail when I execute it with JaCoCo?
To collect execution data JaCoCo instruments the classes under test which adds two members to the classes: A private static field$jacocoDataand a private static method$jacocoInit(). Both members are marked as synthetic.
Please change your code to ignore synthetic members. This is a good practice anyways as also the Java compiler creates synthetic members in certain situation.
Hi All,
I am using jenkins 2.7.2. and jacoco plugin - 0.7.9. In one of my jenkins build i have configured jacoco and it is working succefully.
The issue that i encountered is there are some automation test cases which get executed. Some test cases generate excel sheet as per requirement. Now, when jacoco is enabled it for the build, the automation test case which generates excel sheet. It adds one more column to excel sheet as '$jacocoData' and my test fails as the column numbers did not match the given column number.
Here i dont understand how jacoco can access my automation test excel sheet file. and add column to it. It happens for one test case only.
Does jacoco reads internal files while generating reports.
Can somebody please put some light on it.
Thanks.