In this series of post I’ll - this time - explain how to make Hudson create coverage reports for Perl projects, first of all you need to have Devel::Cover installed and Hudon’s Plot Plugin.
Basically to generate plots all you need is to create a file somewhere containing nothing but YVALUE=”XX.X” after each build that’s all Plot Plugin needs to generate charts.
We will use the following script to create such files I’ve named it cover_plot and upload it to the repository but it can be anywhere as long as Hudson can has access to it
Then all we need to do is change Hudson’s execute shell command and include the following
Now let’s configure Hudson to pickup those files a create a chart with the values…
We’re all set, now if you click on Build now and wait until it finishes you will discover a new button in the left bar called Plots and if you click there you should see something like
Another tip: you can publish the full coverage report by configuring the Publish documents option in Hudson and pointing to the coverage folder.