random technical thoughts from the Nominet technical team

Integrating Structure101 with your build process

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.5 out of 5)
Loading ... Loading ...
Posted by chris on Jun 4th, 2008

Since Miquel has blogged about his experiences integrating Coverity Prevent with our build process, I thought I would do something similar for Structure101.  I explained what this tool is and how it helps you keep track of dependencies within your codebase in a previous posting.  But that was just my experience of using the standalone client.  Now I’m going to describe how I got it running as part of our continuous integration system.

Unlike Coverity Prevent, Structure101 is quite easy to integrate with ant.  It doesn’t come with ant targets as such, but it does come with a set of java-driven command line utilities.  These are easy to call from ant using the <java> task.  So getting Structure101 to run was fairly easy.

I used the S101Report utility to generate a simple HTML file to show the overview details.  However, it would be nice to show more detail and to be able to see changes over time.  In order to do this you need to have a repository and to publish your results to it.  Again this was not too difficult using S101Publisher. I appreciated the fact that you can label the snapshots you publish, which meant that I could use the build number coming from our continuous integration system and tie the information together.

Once you have published snapshots in the repository, you need to be able to view them.  Like Coverity Prevent there is a web application that acts as a front end to this information.  But unlike Coverity, this webapp can be deployed in a standard servlet container such as Apache Tomcat.  This was good, because we are already running one to provide a web interface to the build system.  So with the web application deployed I could link to the results stored in the repository.

So overall I was pleased with how easy it was to get it working.  The details of the analysis are still slightly difficult to get at, because you have to navigate to the Structure101 web app to see them.  It is possible to get simple graphs out of the web app which could be embedded in a project dashboard or the like.  But there isn’t any documentation for these - you just end up grabbing the URL of the graphs already displayed and tinkering with them.  In an ideal world there’d be some JavaScript that you could embed in a results page that would pull out the required graphs or figures without the need to actually navigate to the web app itself.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Recent Posts

Highest Rated

Categories

Archives

Meta: