JaCoCo Coverage Column plugin (clone of Emma Coverage Column plugin)

372 views
Skip to first unread message

Dominik Stadler

unread,
Aug 19, 2012, 4:55:50 PM8/19/12
to jenkins-jacoco-pl...@googlegroups.com
Hi,

for my Emma-based Jenkins builds I am using the plugin "Emma Coverage Column" to get a quick overview of the coverage numbers of builds on the Dashboard, see https://wiki.jenkins-ci.org/display/JENKINS/Emma+Coverage+Column

With the new JaCoCo based configs, I was missing this feature because the column-plugin is based on EmmaBuildAction and thus does not work with JaCoCo any more.

In order to get this feature back, I created a copy of the plugin and adjusted it for the JaCoCo plugin, the code is currently available at https://github.com/centic9/jacococoveragecolumn-plugin . If there is enough interest (and I find time to dig into the necessary steps), I can try to add that as official plugin.

Currently there are then two columns if you use both Emma and JaCoco, one for Emma, one for JaCoCo. We could also merge both emma and jacoco plugin into one to have one column, however in the long run I see Emma going away and only JaCoCo being used any more and therefore I would keep it as separate plugin for now.

Thanks... Dominik.

Mickael Istria

unread,
Aug 20, 2012, 4:13:36 AM8/20/12
to jenkins-jacoco-pl...@googlegroups.com
Hi,


On 08/19/2012 10:55 PM, Dominik Stadler wrote:
In order to get this feature back, I created a copy of the plugin and adjusted it for the JaCoCo plugin, the code is currently available at https://github.com/centic9/jacococoveragecolumn-plugin . If there is enough interest (and I find time to dig into the necessary steps), I can try to add that as official plugin.

From an end-user point of view, I'd like to see this feature directly integrated into Jacoco Jenkins plugin. Maybe you should negociate with Ongjen to get it directly integrated in the Jacoco Jenkins plugin.
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

Dominik Stadler

unread,
Aug 21, 2012, 2:05:38 AM8/21/12
to jenkins-jacoco-pl...@googlegroups.com
Hi,

I'm fine with that as well, Ongien, if you are willing to incorporate this functionality I can prepare the changes in a clone of the JaCoCo plugin and send you a pull-request when I am done, should not be hard to get that integrated and it is not very intrusive to the user as well, only one more item in the Dashboard-edit-add-column-
list.

Thanks... Dominik.

Dominik Stadler

unread,
Aug 26, 2012, 4:23:41 PM8/26/12
to jenkins-jacoco-pl...@googlegroups.com
Hi,

I started to play around with integrating the JaCoCoColumnCoverage into the JaCoCo plugin itself, but I am facing a very strange issue:

The JaCoCoPublisher class has

private final ArrayList<ConfigRow> configRows;

    public JacocoPublisher(ArrayList<ConfigRow> configRows) {
        this.configRows = configRows != null ? new ArrayList<ConfigRow>(configRows) : new ArrayList<ConfigRow>();
    }


but in the following line I get a NullPointerException!

ArrayList<ModuleInfo> reports = new ArrayList<ModuleInfo>(configRows.size());

How is that possible? There is no other constructor of the JaCoCoPublisher, so configRows should never ever be null?! I am running the current plugin code as I deployed several times and changes are visible, the line number in the Exception changes if I add empty lines...

Can this be caused by the reflection that is done for the Jenkins plugin features? Any hints whats going on here and how I can fix it?

Thanks ... Dominik.

Dominik Stadler

unread,
Aug 26, 2012, 4:33:56 PM8/26/12
to jenkins-jacoco-pl...@googlegroups.com
I'm not sure why, but it was fixed by editing the configuration of the build and setting the new options that came with JaCoCo 1.0.3....

Thanks... Dominik.
Reply all
Reply to author
Forward
0 new messages