Search code examples
javaclasspathfitnesse

How to set Relative Path for Class files in Fitnesse Test Case


I have created Wiki pages and Fixtures in my local machine, and it is working fine. However,if I share the same code with others, they always needs to change the path for class files in the classpath.

Ex:

Class Path in my machine

!define TEST_SYSTEM{fit} classpath: fitnesse-standalone.jar classpath: C:\Users\workspace\FitneeseProject\target\classes

Class Path in my friend's machine

!define TEST_SYSTEM{fit} classpath: fitnesse-standalone.jar classpath: D:\testworkspace\FitneeseProject\target\classes

Also, while running the testcases through Jenkins these hardcoded path would not work.

Is there any option set relative path.


Solution

  • The path you specify IS relative, to the current directory from where you launch fitnesse.

    So if you and your friend both make the directory containg the standalone jar the current directory when starting the wiki. The class path can be a relative path to that directory.