January 14, 2008 - Hoorah for XSLT!

It would be handy to have a report of all the unexpected exceptions that get thrown.

I've lost count of the number of times I've heard that. I've even said it myself a few times.

It seemed like it would be pretty easy to do using the dashboard.xml feature of AgitarOne, so I decided to give it a try.

The management dashboard contains a lot of information and we often get asked if there is a way to get at the raw data so that customers can generate their own reports...hence dashboard.xml.

The dashboard.xml file contains all the raw data from agitation and the test runner: coverage, stack traces, test results, agitation results etc. I figured that, if I generate a complete set of tests for a project and then generate a dashboard, I could extract a list of all of the methods that throw runtime exceptions using XSLT. It was surprisingly easy.

XSLT is one of those technologies that, once you figured out how to use it, is very powerful but, unless you use it all the time, you have to relearn all the little tricks each time. It's well worth the effort though.

I wrote up the whole process, including a mini-tutorial on XSLT, at www.junitfactory.com/articles/ but here's the executive summary for people who already know XSLT:

  1. Generate tests for you project
  2. Generate a Developer Dashboard
  3. Transform the dashboard.xml using XSLT

And here's the resulting report:


Posted by Kevin Lawrence at January 14, 2008 04:46 PM


Trackback Pings

TrackBack URL for this entry:


Comments

Post a comment




Remember Me?