How to access dynamic FitNesse parameters in a FitNium table?

531 views
Skip to first unread message

FitNium User

unread,
Jul 15, 2010, 6:07:35 AM7/15/10
to Fitnium
Hello,

I have a problem when using the response of a FitNesse table inside
the check of a FitNium table. First I want to provide you with an
example for my problem:

#####################################

!define test_message (Advertising Programs)

!|EchoFixture|
|operation|echoListToString|
|key|echo|
|set|list[0]|Advertising Programs|
|invoke||
|check|response||
|check|response!=null|true|

!define test_message2 (${ echo.response })

|The server is located at | localhost |
|The server is on port | 4444 |
|Using the browser | *firefox | start at | http://www.google.com |
|check | is selenium initialised | true |
|set speed to |50| milliseconds |
|set timeout to |50000| milliseconds |

|starting at URL| /ncr |
|wait For Page To Load For | 5 | seconds |
|check|is text present|${test_message}|true|
|check|is text present|${test_message2}|true|

#####################################

When I execute this code, the check for the variable test_message is
successful because it is checked for the words 'Advertising Programs'.
However the second check fails because it is checked for the words '$
{ echo.response }'.

So how can I access FitNesse variables inside a FitNium table that are
dynamically filled?

Keith Sterling

unread,
Jul 15, 2010, 6:28:12 AM7/15/10
to Fitnium
A common problem which is more Fitnesse than Fitnium

The problem is !define are evaluated when the page is parsed by
Fitnium not during execution of the page. So before any of your
fixtures execute test_message has been evaluated to 'Advertising
Programs' and test_message2 has been evaluated to '$
{ echo.response }'

You need to look at using Synbols to pass information between
Fixtures, take a look at the Fitnesse documentation at
http://www.fitnesse.org/FitNesse.UserGuide.SymbolsInTestTables

Keith

FitNium User

unread,
Jul 16, 2010, 3:26:53 AM7/16/10
to Fitnium
First of all thanks a lot for your very fast response!

The same problem occurs if I directly use ${ echo.response } inside
the check instead of defining a variable test_message2. But I guess
it's the same problem so that this statement is already evaluated when
FitNium parses the page...

I tried to use symbols for the given example without success.
Unfortunately I'm not using any kind of column fixture, which seems to
be used in the Fitnesse documentation. I'm using a service fixture.
Neither I manage to store any information in a service fixture table
using symbols nor I manage to fetch up any information in a FitNium
table using symbols.

It would be great if you could provide me with some info, how to use
symbols in the upper example.

Best regards
Bernd

On Jul 15, 12:28 pm, Keith Sterling <keiffs...@gmail.com> wrote:
> A common problem which is more Fitnesse than Fitnium
>
> The problem is !define are evaluated when the page is parsed by
> Fitnium not during execution of the page. So before any of your
> fixtures execute test_message has been evaluated to 'Advertising
> Programs' and test_message2 has been evaluated to '$
> { echo.response }'
>
> You need to look at using Synbols to pass information between
> Fixtures, take a look at the Fitnesse documentation athttp://www.fitnesse.org/FitNesse.UserGuide.SymbolsInTestTables

Keith Sterling

unread,
Jul 20, 2010, 4:27:01 AM7/20/10
to Fitnium
See new post http://groups.google.com/group/fitnium/browse_thread/thread/cb4ba0f2949c9594

I have create a full example of how to pass data in and out of Fitnium
( and other Fixtures ) using Fitnesse Symbols
Reply all
Reply to author
Forward
0 new messages