0

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 ?

  • What plugin are you using to run the tests? Are your fixtures placing the files, or is that done by the plugin. The behavior that you describe is not something I recognize from fitnesse. – Fried Hoeben Sep 12 '17 at 17:03
  • There's a custom fitnesse-launcher-maven-plugin that allow us to launch it locally. We can code, do our fixture, test it locally then send it to Git. Neither my fixture or the plugin is uploading file. On server, it's done manually by uploading files in wiki. I want it to be in my mvn project so when I launch Fitnesse locally, it appears in the /files folder (which doesn't work yet). – Michael Faurel Sep 13 '17 at 07:50
  • I understand (although I don't understand the concept of manually uploading on server, why not all code/files/test pages in Git?). I believe your question should be directed at the person/people making the launcher. They should allow you to place files in usable locations both locally and remote. – Fried Hoeben Sep 13 '17 at 13:17

1 Answers1

0

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.

Jim Weaver
  • 983
  • 5
  • 15
  • That's a really nice workaround that will allow me to solve the first part of my problem. The second part is that I want my files in my maven project so they appear when I launch Fitnesse locally with mvn (or when build is done in Jenkins). – Michael Faurel Sep 13 '17 at 08:02
  • I have only used fitnesse an an external product running separately from the CI build, but I know people do use it embedded into the source control for their project. – Jim Weaver Sep 13 '17 at 14:25