Tuesday, March 23, 2010

Eclipse Plugin for GivWenZen

One of the weaknesses of most BDD and collaborative acceptance testing tools is the lack of nice tools for maintaining them. What I hope is only a first step in correcting this is a new eclipse plugin for GivWenZen.

The plugin adds simple highlighting to the content.txt test file showing missing step implementations. It also allows navigation from the content.txt test to the implemented step method. If you search for usages of a step method it will show both java and content.txt files.

He has also done a nice 2 minute screeencast:


I am adding a task to create a similar plugin for IntelliJ to my todo list. Thanks for creating this plugin Szczepan!!

Monday, March 22, 2010

Running FitNesse Test in Your Automated Build


If you are creating automated acceptance tests you should be including them in your automated build. Here are a few options for including FitNesse in an automated build.

Ant:

FitNesse comes with a set of Ant tasks that can be used for running tests. Below are the targets that I use in GivWenZen:

<target name="load_fitnesse_taskdef">
<taskdef classpathref="fitnesse.classpath"
resource="tasks.properties" />
</target>
<target name="execute_fitnesse_tests"
depends="load_fitnesse_taskdef">

<start-fitnesse wikidirectoryrootpath="${basedir}"
fitnesseport="${fitnesse.port}" />

<execute-fitnesse-tests suitepage="GivWenZenTests"
fitnesseport="${fitnesse.port}"
resultsdir="${givwenzen.target.dir}"
debug="false"
resultsxmlpage="gwz-tests-results.xml"
classpathref="fitnesse.classpath" />

<stop-fitnesse fitnesseport="${fitnesse.port}" />
</target>


The FitNesse output states that the ant target is deprecated and should be replaced with the FitNesse rest commands. The ant target example from the FitNess site is below:

<target name="my_fitnesse_tests">
<java jar="dist/fitnesse.jar"
failonerror="true"
fork="true">
<arg value="-c"/>
<arg value="FitNesse.MySuitePage?suite&format=xml"/>
<arg value="-p"/>
<arg value="9234"/>
</java>
</target>

Hudson:

The hudson plugin for FitNesse is very easy to configure and use. Once it has been installed and hudson has been restarted set the path to the FitNesse xml output file for your build.




Maven:

I am not a big fan of maven but there is a maven plugin for FitNesse and info for it can be found at http://mojo.codehaus.org/fitnesse-maven-plugin/usage.html.