el n00b
el n00b

Reputation: 1863

fitnesse slim fixture variable substitution failure

Currently I have a FitNesse Slim fixture written with a quick and easy method for processing:

public List<List<String>> doTable(List<List<String>> rows)

Everything is working just fine except for one problem: page variables/expressions.

On the parent page I have a date/time variable defined:

!define myvar {!today (mmddhms)}

On the child page I have my table defined for processing following a similar pattern to the RESTFixture that is available on GitHub:

!| Table:my.domain.MyFixture |
| let | myinnervar | const | ${myvar} |
| uri | http://someuri.com:12345 |
| etc | etc.etc.etc. |


 

The problem is:

The ${myvar} specification does not evaluate properly. Instead of evaluating to a value such as 071511718 it shows up as the actual expression: !today (mmddhms). I need it to evaluate as the proper expression.

In the RESTFixture table that is set up identically and anywhere else it evaluate just fine. However, I am not seeing where the specialized processing code is defined that allows it to properly evaluate.

Can anyone point to the appropriate code in that Fixture or just point me to some documentation. I'm not seeing anything online.

Upvotes: 1

Views: 752

Answers (1)

Mike Stockdale
Mike Stockdale

Reputation: 5266

You're using a literal table which means wiki markup is not interpreted inside the table. Use a plain table and escape the cells that you don't want interpreted as wiki markup

| Table:my.domain.MyFixture |
| let | myinnervar | const | ${myvar} |
| uri | !-http://someuri.com:12345-! |
| etc | etc.etc.etc. |

Upvotes: 1

Related Questions