Is there a way to include dynamic paths in FitNesse ?
Assuming I have the following structure
Credentials
- Local
- Customer
- Admin
- Staging
- Customer
- Admin
TestLogin +
In my TestLogin
page I would like to something like
!define PLATFORM (Local)
!include .Credentials.${PLATFORM}.Customer
....
My Test Tables
I've also (unsuccessfully) tried defining the path:
!define PATH (.Credentials.${PLATFORM}.Customer)
!include ${PATH}
Edit
The accepted answer, strictly speaking, doesn't answer the question (seems it's not possible) but provides a good alternative.
Could it be that your trying to achieve something like: the example of why one would want symbolic links in the user guide?
Would it be acceptable to switch the 'axes' of your reuse (i.e. create a single suite containing TestLogin and use a symbolic link to include this in the hierarchy for each environment where each hierarchy defines some variables (used in TestLogin) that are specific to that environment)?
Have you tried
!define PLATFORM {!include -c <SampleRoot.Credentials.Local.Customer }
${PLATFORM}
....
My Test Tables
? (note the extra space at the end of the !define
)
Depending on the Fitnesse version this might or might not work :)
I'm using v20150814.