Shruti Seth
Shruti Seth

Reputation: 167

Referencing fitnesse variables into java code

Is there any way that I can reference the values of variables written in my fitnesse wiki inside my java code?

For example, I want to use the value of a variable location that I have written in my fitnesse wiki into my fixture code. Is there any way to do it?

This is my code:

!define TEST_SYSTEM {slim}

!path C:\Users\sseth103\Desktop\Fitnesse2

!define location C:\Users\sseth103\Desktop\FT



|Fixture|

|number|result?|

|2     |EVEN   |

|1     |EVEN   |

|3     |EVEN   |

Upvotes: 1

Views: 166

Answers (1)

Michiel Pelt
Michiel Pelt

Reputation: 82

Just pass them to the fixture using ${variable}. Like this

!define myVariable {hello}

|script|myFixture|${myVariable}|

Upvotes: 1

Related Questions