1

1) !| Script |com.playtech.openapi.core.fitnesse.tests.Fixtures |
|$response=|createGroup |121312441||MyGroup|
|$id=|getParameterFromResponse |$response|

!define groupId $id

2) !| Script |com.playtech.openapi.core.fitnesse.tests.Fixtures |
|$response=|createMember|Alex| |$id=|getParameterFromResponse |$response|

!define memberId $id

3) !| Script |com.playtech.openapi.core.fitnesse.tests.Fixtures |
|addMemberToGroup|${memberId}||${groupId}|

How can I copy value from $id to groupId? Because my example doesn't work

PS: results of getParameterFromResponse should be necessarily defined as $id parameter in step 1 and 2. And memberId doesn't equal groupId

1 Answers1

0

You're using two separate concepts as if they were the same.

!define uses markup variables which are part of the FitNesse wiki markup and are used for macro-replacement in pages. They provide another way to parameterize your tests with static values (not changing during a test execution). See http://fitnesse.org/FitNesse.UserGuide.FixtureGallery.ImportantConcepts.MarkupVariables

The symbols in the Slim tables are dynamically assigned values during test execution. See http://www.fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.SymbolsInTables

The two concepts can not be interleaved because the first is assigned statically by the Wiki engine and the second is assigned dynamically by the Slim test engine.

Mike Stockdale
  • 5,256
  • 3
  • 29
  • 33