The project integrates Graphviz into Fitnesse wiki.
- Install Graphviz on machine where your Fitnesse is running.
- Copy jar file from this project Releases to plugins directory of your Fitnesse.
- Restart Fitnesse
The configuration is optional. Plugin will work also without any configuration.
Plugin loads its configuration from file fitnesse-graphviz-plugin.properties
located in same directory as jar file. Usually in plugins directory of your Fitnesse.
It is optional. The plugin searches for dot executable. You can set dot executable in configuration file.
dotExecutable = c:\\Program Files (x86)\\Graphviz2.38\\bin\\dot.exe
After installation and Fitnesse restart you should be able to use command on wiki
!startdot
digraph G {
size ="4,4";
fitnesse [shape=box];
fitnesse -> graphviz [style=bold,label="uses"];
}
!enddot
The command !startdot
has following syntax !startdot ["title"] [align] [width] [height]
- Title has to be surronded by ""
- align can be one of
- c - center
- r - right
- l - left
- width is width in pixels
- height is height in pixels
The plugin parses all lines after !startdot
and before !enddot
.
It creates dot file in temporary directory with parsed lines.
It starts dot executable with arguments dot -Tsvg <generated dot file>
.
It inserts stdout from dot execution into Fitnesse page.
I would like to thank Tibor Trnovsky for idea how to align picture in HTML with <div>
tags (GraphicsSvg.java).
I would like to thank Plantuml developers for code that searches dot executable (GraphvizDotFinder.java).