Blog

FitNesse in your IDE

03 Feb, 2016

FitNesse has been around for a while. The tool has been created by Uncle Bob back in 2001. It’s centered around the idea of collaboration. Collaboration within a (software) engineering team and with your non-programmer stakeholders. FitNesse tries to achieve that by making it easy for the non-programmers to participate in the writing of specifications, examples and acceptance criteria. It can be launched as a wiki web server, which makes it accessible to basically everyone with a web browser.

The key feature of FitNesse is that it allows you to verify the specs with the actual application: the System Under Test (SUT). This means that you have to make the documentation executable. FitNesse considers tables to be executable. When you read ordinary documentation you’ll find that requirements and examples are outlined in tables often, hence this makes for a natural fit.

There is no such thing as magic, so the link between the documentation and the SUT has to be created. That’s where things become tricky. The documentation lives in our wiki server, but code (that’s what we require to connect documentation and SUT) lives on the file system, in an IDE. What to do? Read a wiki page, remember the class and method names, switch to IDE, create classes and methods, compile, switch back to browser, test, and repeat? Well, so much for fast feedback! When you talk to programmers, you’ll find this to be the biggest problem with FitNesse.

Imagine, as a programmer, you’re about to implement an acceptance test defined in FitNesse. With a single click, a fixture class is created and adding fixture methods is just as easy. You can easily jump back and forth between the FitNesse page and the fixture code. Running the test page is as simple as hitting a key combination (Ctrl-Shift-R comes to mind). You can set breakpoints, step through code with ease. And all of this from within the comfort of your IDE.

Acceptance test and BDD tools, such as Cucumber and Concordion, have IDE plugins to cater for that, but for FitNesse this support was lacking. Was lacking! Such a plugin is finally available for IntelliJ.

screenshot_15435-1

Over the last couple of months, a lot of effort has been put in building this plugin. It’s available from the Jetbrains plugin repository, simply named FitNesse. The plugin is tailored for Slim test suites, but also works fine with Fit tables. All table types are supported. References between script, decision tables and scenarios work seamlessly. Running FitNesse test pages is as simple as running a unit test. The plugin automatically finds FitNesseRoot based on the default Run configuration.

The current version (1.4.3) even has (limited) refactoring support: renaming Java fixture classes and methods will automatically update the wiki pages.

Feel free to explore the new IntelliJ plugin for FitNesse and let me know what you think!

(GitHub: https://github.com/gshakhn/idea-fitnesse)

Qxperts. We empower companies to deliver reliable & high-quality software. Any questions? We are here to help! www.qxperts.io

guest
6 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Pablo
Pablo
6 years ago

I think it’s a brilliant idea, but I am struggling to make it work, even though it seems to be very easy.
This is the kind of messages I am getting, it is probably on how my tests are laid.
|script |data utility Could not invoke constructor for DataUtility[0] |
|$REST_BASEURL= The instance scriptTableActor.returnString. does not exist
I’ll keep trying anyway, thanks for the contribution

Michiel
Michiel
5 years ago

Whenever I have this plugin enabled, IntelliJ becomes really slow because it takes for ever to index my projects. Has anyone else experienced this and found a solution?

Suraj Kumar
Suraj Kumar
5 years ago

I tried to run a Test fixture via Intellij and received some Warning message:
INFO: No configuration file found ($HOME/IdeaProjects/MyProject/resources/plugins.properties)
How do I create plugins.properties?
Within the FitNesse Configuration page I do see Warning: WikiPage ‘ FitNesse.Module.Feature.SubFolder.TestPage ‘ not found.
I am not sure how to fix this warning message. I am able to run the test via Web Browser/FitNesseMain started outside of Intellij.
Suraj

Explore related posts