Skip to content
Browse files
Add contributed works
  • Loading branch information
clarkware committed Mar 6, 2020
1 parent 3bc9bd2 commit 5a55225fedd5d2d72327979ac8a28ab577593ff4
Showing 4 changed files with 95 additions and 0 deletions.
Binary file not shown.
@@ -0,0 +1,7 @@
# FitNesse Module Dependency Fixture

Bob Martin contributed the Module Dependency Fixture
(``) for FitNesse.

For details on how to use it, see
[Using the JDepend Fixture for FitNesse](
@@ -0,0 +1,13 @@



java -classpath $JDEPEND_DIR/lib/jdepend.jar jdepend.xmlui.JDepend -file jdepend.xml $JDEPEND_DIR/lib/jdepend.jar

xsltproc jdepend2dot.xsl jdepend.xml >

$GRAPHVIZ_PATH/dot -Tpng -o jdepend-report.png
#$GRAPHVIZ_PATH/dot -Tsvg -o jdepend-report.svg
@@ -0,0 +1,75 @@
<?xml version="1.0"?>

Takes the XML output from JDepend and transforms it
into the 'dot' language used by Graphviz
to generate a project dependency graph.
The packages show up as rectangles with the package name
and the number of classes. Arrows point to other packages
the package depends on. The rectangle is colored blue, but
it turns to darker shades of red the further the package is
from the 'main line'.
Contributed by David Bock.

<xsl:stylesheet version="1.0" xmlns:xsl="">

<xsl:output method="text"/>
<xsl:template match="JDepend">
digraph g {
graph [
rankdir = "LR"
node [
fontsize = "12"
fontname = "Courier"
shape = "ellipse"
<xsl:apply-templates select="Packages"/>

<xsl:template match="Packages">
<xsl:apply-templates select="Package" mode="node"/>

<xsl:template match="Package" mode="node">
<xsl:text>"</xsl:text><xsl:value-of select="@name"/> <xsl:text>" [
select="@name"/><xsl:text> | Total Classes: </xsl:text><xsl:value-of select="Stats/TotalClasses/."/>
color=".99 </xsl:text>
<xsl:when test="Stats/D">
<xsl:value-of select="Stats/D/."/>
<xsl:text> .9"
<xsl:apply-templates select="DependsUpon"/>

<xsl:template match="Package" mode="edge">
<xsl:text>"</xsl:text><xsl:value-of select="../../@name"/> <xsl:text>" -&gt; "</xsl:text><xsl:value-of select="."/><xsl:text>"

<xsl:template match="DependsUpon">
<xsl:apply-templates select="Package" mode="edge"/>


0 comments on commit 5a55225

Please sign in to comment.