gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject Re: JUnit reports & Gump
Date Tue, 01 Apr 2003 01:59:41 GMT
Leo Simons wrote:
> Hi gang,
> 
> I'm planning to do something similar to the <javadoc/> option. I want to 
> make the results of <junitreport/> available through GUMP. My hunch is 
> that a new tag should be added to <project/> definitions to point at the 
> location of the generated reports, then having a copy or symlink made 
> from the generated logs by modifying the xslt stylesheets.
> 
> is that the general idea? Anything I should look at or be aware of? 
> Tips? Anyone already done this?

Excellent!

Here's a brief overview of how gump works internally, relative to 
javadoc.  Everything I say would apply to junitreport.

Jenny is a java program which is responsible for merging together all of 
the xml descriptions into a single work/merge.xml file.  In the process, 
it resolves, verifies and cleans up everything.  The key files affected 
in this is workspace and project - as you will need an javadoc element 
in workspace to identify where (and if) the output will be placed (both 
the directory and url), and project.java will need to handle the element 
you have already mentioned.

Now comes the twist: project.java places all the fully resolved javadoc 
information onto the associated module element.  Define the javadoc 
element in your workspace and "build gump gen" to see what is produced. 
  Look for javadoc elements with nested descriptions.  The descriptions 
will have fully resolved source, dest, and url attributes.

You can debug your work so far simply by inspecting the generated 
work/merge.xml.  Admittedly, the DOM level manipulations that will be 
required in Project.java aren't that fun or elegant, nor, however is 
this very hard and you can simply clone resolveJavadoc to get you started.

The next step is the one that actually makes it all happen.  It also is 
the easiest.  The stylesheet/pubdocs.xsl produces a perl script.  Don't 
let that freak you out.  The script creates a map (HashMap in javaterms) 
of sources and destinations, and iterates over them, copying directories 
as it goes.  Simply clone the template for javadoc, adjust as necessary, 
and the junitreport files should be added to the map.  Visually inspect 
pubdoc.pl to see what I mean.

The next step is to where most of the thought will go into.  Look at 
stylesheet/xref.xsl.  Search for javadoc.  This is what produces the 
following:

http://nagoya.apache.org/~rubys/gump/javadoc.html

If you look closely, all of the jakarta commons projects are under the 
jakarta commons module.  Single project modules are formatted 
differently.  Hopefully, most of the logic should be the same, but if 
there is any creativity required, this would be the area.

Finally, please update site/xdocs as appropriate.

> g'night,
> 
> - LSD

Good luck!

- Sam Ruby


Mime
View raw message