1

I'm wondering is there is a way to use multiple kinds of tables with SLIM (as opposed to FIT) in one test and keeping the context of the same instance of the test class (the harness around the system under test).

With FIT you can enter flow mode by referencing a DoFixture be itself at the start of a test page. This allows you to leverage a variety of different table/fixture type.

I would like to do something similar with SLIM (maybe using a Script Fixture).

Is this possible?

Christoph
  • 4,251
  • 3
  • 24
  • 38

1 Answers1

2

You can have multiple script tables all using the same instance (or 'actor') by not specifying a class as second cell value in the 2nd and following tables, see http://fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.ScriptTable. You can also use this same instance/actor in decision tables (that do not link to separate code, but just invoke scenario's for the activated script fixture, see http://fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.ScenarioTable).

I'm not aware of other Slim tables that can also share a fixture instance.

Fried Hoeben
  • 3,247
  • 16
  • 14
  • Thanks, that seems to work. I'm getting an "Could not complete testing: java.lang.ArrayIndexOutOfBoundsException: 1" error between the scripts, but it still works as described. – Christoph Apr 05 '16 at 22:24