Robert
Robert

Reputation: 81

fitnesse variable in suite

I'm facing a problem with Fitnesse.

I have the following testcase with these steps.

  1. Generate XML
  2. send xml
  3. read answer
  4. return property from answer

I have another testcase that should use that return value.

Can I set a global variable that I can use in my whole testsuite? (Btw the return value is variable)

Thanks in advance.

Upvotes: 0

Views: 621

Answers (1)

Fried Hoeben
Fried Hoeben

Reputation: 3272

It sounds like a bit design-smell to pass data between tests. But maybe there is a good reason for doing so in your situation. If it is done in a SuiteSetUp or SetUp it might more expected.

You can store the property in a Slim Symbol and read that property in the other test. Or, least preferred approach, you can create your own static variable in a fixture and pass data using that.

Upvotes: 0

Related Questions