-1

I have 2 pages a Suite page Suite1 and a SuiteSetUp page. Inside the suiteSetUp page I am calling a java constructor with the suite name as parameter.

now When I run my fitnesse suite I am getting the string 'SuiteSetUp' in java. I should get Suite1.. is it doable in FitNesse using java?

!|library |
|suite set up|${USERNAME}|${suiteName}|

suiteName is defined in a template which is included to this page

suiteName is defined as follows.
!define suiteName {${RUNNING_PAGE_NAME}}

this is how I included the template to the page the !define command is written inside the template page
!include -c .FrontPage._TEMPLATE

Jobin
  • 5,610
  • 5
  • 38
  • 53

1 Answers1

0

I guess you include the template page in the SuiteSetUp page, which means the RUNNING_PAGE_NAME will be "SuiteSetUp", thats why you are getting that value. (ok it may sound like I did not say anything... but that's a simple fact).

You can switch to RUNNING_PAGE_PATH or PAGE_PATH and perform string manipulation to retrieve the last token in java if you want to do it in a similar way.

Xiawei Zhang
  • 1,690
  • 1
  • 11
  • 24
  • RUNNING_PAGE_PATH is giving me SuiteSetUp instead of the suite page name – Jobin Jun 08 '16 at 08:53
  • @Jobin from what I understand, Suite Page Name will never show up in `${RUNNING_PAGE_PATH}`, because Suite Page itself is never the running one. you are in fact executing SetUp/SuiteSetUp pages or test pages inside a suite. – Xiawei Zhang Jun 08 '16 at 08:57
  • @Jobin So as I suggested, you should probably look at manipulating the value from PAGE_PATH instead. – Xiawei Zhang Jun 08 '16 at 11:26