0
votes

I am a user of fitnesse tool and have a number of automated tests written on it. Recently, I received a security vulnerability for my remote machine (Windows 10 machine, where I have installed Fitnesse), in which it requires me to update my web server. Since there are no other web server installed on that system, I suspect that the embedded web server as part of Fitnesse jar is something which needs to be upgraded.

So, I began my quest to upgrade the Fitnesse project to use the latest version. In my exploration, I found out that I am using a very old version of Fitnesse (release 20070619). So, I downloaded the latest fitnesse-standalone jar (release 20200501). So, I replaced the existing fitnesse.jar with this new one, and restarted the fitnesse server (Note that I am using Open JDK 8, and jre 8 bin is defined on my path variable). This is the command I use to start it (as was the case with the old fitnesse jar that was being used):

java -cp fixtures/FitX.jar;fitnesse.jar fitnesse.FitNesse -p 801 -l DailyLogs %1 %2 %3 %4 %5

Here FitX.jar are some of the fixtures we had written for our automation framework, so we add that to the classpath. This works fine with the old version of Fitnesse

Upon starting, it threw an error, so I came to know that I need to use the new Main class definition, so I started it again using:

java -cp fixtures/FitSabre.jar;fitnesse.jar fitnesseMain.FitNesseMain -p 801 -l DailyLogs %1 %2 %3 %4 %5

Note that I renamed fitnesse-standalone.jar to fitnesse.jar. This successfully started the server with the new fitnesse jar, and I was able to reload my test with a new beautiful Fitnesse Wiki page. However, when I executed the test, it threw up this error:

set
Could not find fixture: set.    %lniata%    to  %RESPONSE%  using row   1   and column  5

This is how my raw text looks like:

!!|set|%objSession%|to|%Logincreditial%|using row|3|and column|2|

And the whole page was filled with the same error for other fixtures. I believe these are the custom fixtures which we had written as part of fitX.jar.

So, I began searching for this issue, and found that I need to add the following lines to the beginning of my test:

!define TEST_SYSTEM {slim}

!path C:\FitNesse

where C:\FitNesse is where all my fixtures are located. Here is the directory structure of my Fitnesse tests:

- C:\FitNesse
    - DailyLogs
        - fitnesse20200621155541.log
        ...
    - FitNesseRoot
        - All my fitnesse tests as folders
        - content.txt
        - properties.xml
    - fixtures
        - commons-lang-2.1.jar
        - FitX.jar
        - log4j.jar
        - xml-config.jar
    - fitlibrary.jar (seems to be pretty old - just 279 KB file)
    - fitnesse.jar (the latest standalone jar version renamed as this)

Following are the contents of content.txt present inside FitNesseRoot:

!contents

!path classes
!path fitnesse.jar
!path fitlibrary.jar
!path fixtures/FitX.jar
!path fixtures/log4j.jar
!path fixtures/commons-lang-2.1.jar
!path fixtures/xml-config.jar

After adding the changes (!define TEST_SYSTEM {slim} & !path C:\FitNesse) to my test, this is the new error I start getting when I re-execute the test:

set Could not invoke constructor for set[3] %strTestsessionname2% The instance decisionTable_0. does not exist  to The instance decisionTable_0. does not exist Not Provided The instance decisionTable_0. does not exist

So, I decided to not take such a huge leap from release 2007 to 2020 of Fitnesse, and I started to slowly progress to see what is the max version I could bump my fitnesse up to. In my research, I was able to successfully bump up from release 20070619 to 20101101, and my tests were executing fine. However, as soon as I went to release 20110104, I started seeing the "Could Not Find Fixture" as noted above. So, I am assuming that since the 2011 release of Fitnesse, my tests would face this issue, and hence I am unable to use the latest versions of Fitnesse.

How can I resolve this so I could use the features of latest fitnesse version?

1
I'm not quite sure what happened way back then. But you are using fit library (which I haven't used myself and does not seem to be actively maintained) which suggest you are using Fit, which would mean that !define TEST_SYSTEM {slim} should not be added. Are you on the latest FitLibrary (I believe 20080812)?Fried Hoeben
Updated the fitlibrary.jar as you said (to the 20080812) version as well. However, I still get the same issue. Any other suggestions as to how I can upgrade and resolve these issues?Anukul Singhal

1 Answers

1
votes

Found the solution for my issue. Here is the partial fitnesse script in edit mode which was working in old version and not the new version:

!!|set|

When switched to the new version of Fitnesse, this was not rendered as part of the decision table because of the extra ! (exclamation mark). So, I edited the script to this:

!|set|

After this, the page rendered fine in the latest Fitnesse version, and I did not get the "Could Not Find Fixture" error anymore.

I am able to now work with the latest version of Fitnesse.