Have files in Fitnesse folder /files when lauching in local (or CI)

658 Views Asked by At

I have a fixture that take a file from my Fitnesse server and do treatment on it and check the result. I want to have this file locally with the same path http://fitnesseonserver/files/society/01-Upload/Test1/myfile.xml to http://localhost:9123/files/society/01-Upload/Test1/myfile.xml but when I put it in src\it\fitnesse\FitNesseRoot\files\ in my maven project, I don't really have it when I launch Fitnesse with mvn clean verify -Pwiki.

It appears in a special folder called FitNesseRoot\files\testResults and the subfolders are replaced by folder1.folder2.folder3/ instead of folder1/folder2/folder3/... The fact is that I have hundreds of tests and I can't afford to change all my tests paths.

Anyone knows where to put files in my maven project so when I launch Fitnesse on local (and afterwards, on Jenkins for builds), to have files on the folder /files on Fitnesse with the righteous path ?

1

There are 1 best solutions below

2
On

Have the fixture code check for a path environment variable? And if not present it assumes the path on the stand-alone fitnesse server. If env variable present it loads the file using that path. If the maven plugin you are using to run fitnesse as part of your maven build allows environment variables to be passed to the java process, that might solution may work.