Search code examples
fitnesse

Include dynamic paths in FitNesse


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.


Solution

  • 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)?