Installing FitNesse, Selenium and Xebium

As I mentioned in my last post, this post will discuss installing FitNesse, Selenium and Xebium. Xebia maintains good installation instructions at Xebium’s Github site, which I recommend you start with. You will download the code, compile and run it. This will get you running quickly.

So why write an extra installation post? Because I think compiling the code every time you start Xebium is a bit much, and of course to provide some extra quick hints and tips.

So once you’ve thoroughly tested FitNesse and Xebium and decide you want to use this framework for maintaining and abstracting your Selenium tests, how do you install it?

First, we’re going to build a JAR file and batch scripts to run it. This can be done by running Maven with mvn -Pjar-with-dependencies package in your Xebium source directory. This will produce a JAR file in your /target directory, which you can execute using java -cp xebium-0.x.jar fitnesseMain.FitNesseMain. If port 80 is already in use on your machine, specify an extra -p 8080 switch to change the port.

For easy access, put this in a .bat or .sh file and set a job for starting this batch file at machine startup, using either Windows Task Scheduler or cron jobs.

Running your tasks nightly

To run your tasks nightly, create an extra task which runs every night at a given time. Have it start the following batch file:

cd C:MyFitNesseFolder
java -cp xebium-0.x.jar fitnesseMain.FitNesseMain -p 1234 -c "MyFirstTestSuite?suite"

In this batch file, port 1234 can be changed, as long as it is an unused port. This batch file starts a new FitNesse instance and, using the -c command line switch, starts the tests in test suite MyFirstTestSuite. More on the -c switch can be found on the FitNesse User Guide CommandLineTestRunner page.

Some other tips

Sorry about this, just had to... ;-)

Here's your elephant in the room

First, the elephant in the room: Install your testing framework on a server, not on your workstation or laptop. This will allow the rest of the team access without your machine present. As FitNesse includes a webserver, you won’t need anything else, apart from configuring your firewall. Note that FitNesse also has advice on which machine to put your installation, although Virtual Wikis appear to be deprecated.

Next, to increase traceability in your development and testing team, secure your FitNesse with a login and password for each user. This can be found in FitNesse’s User Guide at the PasswordFile page. This will allow you to check who changed the test, so you can ask him why he did it. Not perfect for traceability, but at least a step up. You can of course also use this to secure your FitNesse.