XNSIO
  About   Slides   Home  

 
Managed Chaos
Naresh Jain's Random Thoughts on Software Development and Adventure Sports
     
`
 
RSS Feed
Recent Thoughts
Tags
Recent Comments

Is Fitnesse ready for enterprise use?

I think Fitnesse can be a very handy tool. I appreciate Object Mentor‘s contributions. But there are certain features which are not supported by Fitnesse. These small things can be very painful on projects. I think a part of the reason is, lack of feedback from people using it. I hope this blog can be perceived as feedback.

An initial list of complains from people about Fitnesse:

  1. Lack of version control compatibility. This issue can be quite limiting if you are using a version control system which has pessimistic locking [makes all checked in files to read-only].
  2. Crazy wiki syntax
  3. Search sucks big time
  4. Lack of support for integration with Ant and similar tools
  5. Continuous Integration servers do not have a built in mechanism to display Fitnesse results. For Ex: CruiseControl does not have a style sheet to display Fitnesse results.
  6. Fitnesse cannot execute tests inside an application/web server. By default Fitnesse spins of a new process called FitServer, which runs all the tests. In this setup it is not possible to debug your fixtures and application code.
  7. Lack of standard out-of-box Fixtures which let you deal with databases. I know about JdbcFixtures. But it is crazy to expect people who write fit tests to know SQL. It is also crazy to mention all the DB connection properties on every single fit document [test].
  8. Lack of patterns /anti-patterns around Fitnesse. Ex: Should we use statics to share data between fixtures? How to design Fixtures [to inherit or not to inherit]? Etc.

Following is the list of work around we found:

  1. Version control compatibility: Fitnesse is pretty extensible. It lets you add plugins by adding new responders. So we added a plugin which lets one checkout files from ClearCase. Now users can click on the ckeckout menu item and easy checkout files from the fitnesse page. This can be easily extended to other version control systems. Please note that we have not added checkin facility. The rationale behind it is, we have FitnesseRoot under the project directory. So once the developer has done all the changes and are ready to checkin, they find checkouts at the project level and checkins all the files, including the content.txt and properties.xml file. This is great coz it lets developers do atomic checkins.
    Hopefully I can add support for different Version controls and contribute it back to Fitnesse or spawn another open source project.
  2. There is not much we can do about the wiki syntax except reading the MarkupLanguageReference. There are lot of good tricks and tips.
  3. Right now we are using Google Desktop to search our wiki pages. In future, I plan to write a plugin for FitNesse to make use of the Lucene Search Engine.
  4. We are able to run all our fit tests thru add by using the following target.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    
    <br />
    &lt;target name="fitNesseTest" description="Run FitNesse acceptance tests." if="project.fitnesse.tests"&gt;<br />
    &lt;echo&gt;About to run fitnesse server&lt;/echo&gt;<br />
    &lt;property name="fitnesse.port" value="8090" /&gt;<br />
    &lt;parallel&gt;<br />
    &lt;daemons&gt;<br />
    &lt;java classname="fitnesse.FitNesse" classpath="${fitnesse.root}/fitnesse.jar"&gt;<br />
    &lt;arg value="-p" /&gt;<br />
    &lt;arg value="${fitnesse.port}" /&gt;<br />
    &lt;arg value="-e" /&gt;<br />
    &lt;arg value="0" /&gt;<br />
    &lt;arg value="-d" /&gt;<br />
    &lt;arg value="${fitnesse.root.location}" /&gt;<br />
    &lt;/java&gt;<br />
    &lt;/daemons&gt;<br />
    &lt;sequential&gt;<br />
    &lt;echo&gt;sleeping for 3 seconds to let FitNesse server start&lt;/echo&gt;<br />
    &lt;sleep seconds="3" /&gt;<br />
    &lt;echo&gt;running fit tests from ${fitnesse.location}&lt;/echo&gt;<br />
    &lt;echo&gt;Running fit tests at "${project.smoke.tests.suite.page}"&lt;/echo&gt;<br />
    &lt;java classname="fitnesse.runner.TestRunner" classpath="${fitnesse.root}/fitnesse.jar " fork="true" jvm="${java.home}/bin/java.exe" dir="${fitnesse.location}" resultproperty="fit.test.failures"&gt;<br />
    &lt;classpath&gt;<br />
    &lt;!-- you can add classpath here. Not required if you are using standard fitnesse--&gt;<br />
    &lt;/classpath&gt;<br />
    &lt;arg value="-debug"/&gt;<br />
    &lt;arg value="-nopath"/&gt;<br />
    &lt;arg value="-html" /&gt;<br />
    &lt;arg value="${fitnesse.output.html.file.location}" /&gt;<br />
    &lt;!-- optional --&gt;<br />
    &lt;arg value="-xml" /&gt;<br />
    &lt;arg value="${fitnesse.output.xml.file.location}" /&gt;<br />
    &lt;!-- end of optional --&gt;<br />
    &lt;arg value="${fitnesse.host.address}" /&gt;&lt;!-- usually localhost --&gt;<br />
    &lt;arg value="${fitnesse.port}" /&gt;<br />
    &lt;arg value="${project.smoke.tests.suite.page}" /&gt;&lt;!-- Ex: FronPage.projectName --&gt;<br />
    &lt;/java&gt;<br />
    &lt;echo&gt;Finished FIT tests: ${fit.test.failures} failures/exceptions&lt;/echo&gt;<br />
    &lt;fail message="FIT test failures/exceptions: ${fit.test.failures}"&gt;<br />
    &lt;condition&gt;<br />
    &lt;not&gt;<br />
    &lt;equals arg1="${fit.test.failures}" arg2="0" /&gt;<br />
    &lt;/not&gt;<br />
    &lt;/condition&gt;<br />
    &lt;/fail&gt;<br />
    &lt;/sequential&gt;<br />
    &lt;/parallel&gt;<br />
    &lt;/target&gt;<br />

    It would be great to have build-in ant task which an do this.

  5. There are some simple things you can do to integrate Fitnesse with Continuous integration server like CruiseControl. For more details: Integrating Fitnesse with CruiseControl
  6. I have an open source project called Patang, which lets you run Fit and Fitnesse tests inside the application/web server. For more details: Patang on SourceForge and Running Fitnesse inside the container
  7. We have developed a list of standard fixtures which help you insert data into the database tables, clean it up based on ids, etc. It uses properties file to read all the database connection parameters. It also hides any SQL from the user. I‘ll shortly blog about these fixtures. May be it deserves another small open source project.
  8. Am planning to expand the Patterns on the Fitnesse website.

After reading this blog, you might get a feeling that I‘m crazy about spawning new open source projects. That‘s not true. There is a reason behind me making that decision.


    Licensed under
Creative Commons License