unclebob / fitnesse

FitNesse -- The Acceptance Test Wiki
fitnesse.org
Other
2.02k stars 712 forks source link

Running FitLibraryServer and TEST_SYSTEM {slim} within same page on a per table basis #1019

Open brucetrask opened 7 years ago

brucetrask commented 7 years ago

Is it possible to execute some tables within a page with Slim and others with FitLibraryServer? I need features of both systems and would like to be able to interpret and runs some tables within the page with Slim and others with FitLibrary runner. Any way to do that. I tried it and it did not work well at all.

mgaertne commented 7 years ago

Well, it's not possible. When running a suite with subtests/suites in FitLibrary and SLiM, FitNesse will separate the set for each test runner, and invoke the test runner with the particular tests for each runner. So, within a test page, you can't change the test runner, which would be necessary in order to get the results that you want.

If you consider now separating your test into two different pages or suites, I also wouldn't recommend doing that as no test framework guarantees the order of the tests being executed for maintenance and reproduction of the test results.

What keeps you from implementing from the same triggers to your application in either FitLibrary or SLiM and combine it in one test page per runner?

Save our Scrum: http://leanpub.com/saveourscrum -- Dipl.-Inform. Markus Gaertner Author of ATDD by Example - A Practical Guide to Acceptance Test-Driven Development

http://www.shino.de/blog http://www.mgaertne.de http://www.it-agile.de Twitter: @mgaertne

On Wed, Jan 18, 2017 at 7:10 PM, brucetrask notifications@github.com wrote:

Is it possible to execute some tables within a page with Slim and others with FitLibraryServer? I need features of both systems and would like to be able to interpret and runs some tables within the page with Slim and others with FitLibrary runner. Any way to do that. I tried it and it did not work well at all.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/unclebob/fitnesse/issues/1019, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC7wAIFDUlT7yXleIu8f9tcdMrIpEWzks5rTlWZgaJpZM4LnNlC .

brucetrask commented 7 years ago

Thanks @mgaertne. In my story test tables in one page I have the need to leverage some Slim features and some FitLibrary features and so was hoping to do it without going off page to another page to get a new runner. But I understand what you said as to how it works. Thanks.

jediwhale commented 7 years ago

I think just about every Slim feature should be available (in perhaps a different form) in FitLibrary or quite easy to implement with a new fixture.

On 2017-01-18 12:05, brucetrask wrote:

Thanks @mgaertne https://github.com/mgaertne. In my story test tables in one page I have the need to leverage some Slim features and some FitLibrary features and so was hoping to do it without going off page to another page to get a new runner. But I understand what you said as to how it works. Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/unclebob/fitnesse/issues/1019#issuecomment-273568978, or mute the thread https://github.com/notifications/unsubscribe-auth/AACXYznaMo4irCKMqWM2NGBuUUnOhjseks5rTmJwgaJpZM4LnNlC.

brucetrask commented 7 years ago

Understood @jediwhale . And this is the case at some level. However at some level there are large and incompatible differences in features between the two. Some that are key for me are

  1. The ability to handle nested tables more complex than hash maps. Easily done with FitLibrary. Hardly even possible without modifying Slim source.
  2. Markup within cells (e.g. !style_xxx) are passed to fixtures with Slim and needs to be stripped and added in the fixture. It is not passed through by FitLibrary
  3. Per-cell validation and reporting is not really possible due to the distributed nature of Slim but works fine with FitLibrary. There are times when I want the features in Slim not provided by FitLibrary and vice-versa and sometime I want to switch and combine within the same page and it would be great if I could tell the page runner to use either Slim or FitLibrary on a per table basis. But I know this is not part of the architecture right now.
jediwhale commented 7 years ago

I agree FitLibrary has features not available with Slim. But what Slim features do you require that couldn't be handled by FitLibrary?

On 2017-01-19 07:25, brucetrask wrote:

Understood @jediwhale https://github.com/jediwhale . And this is the case at some level. However at some level there are large and incompatible differences in features between the two. Some that are key for me are

  1. The ability to handle nested tables more complex than hash maps. Easily done with FitLibrary. Hardly even possible without modifying Slim source.
  2. Markup within cells (e.g. !style_xxx) are passed to fixtures with Slim and needs to be stripped and added in the fixture. It is not passed through by FitLibrary
  3. Per-cell validation and reporting is not really possible due to the distributed nature of Slim but works fine with FitLibrary. There are times when I want the features in Slim not provided by FitLibrary and vice-versa and sometime I want to switch and combine within the same page and it would be great if I could tell the page runner to use either Slim or FitLibrary on a per table basis. But I know this is not part of the architecture right now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/unclebob/fitnesse/issues/1019#issuecomment-273789073, or mute the thread https://github.com/notifications/unsubscribe-auth/AACXY2fNGbdracPBXUTw5CZZGuNJJ8eNks5rT3JNgaJpZM4LnNlC.

brucetrask commented 7 years ago

These are a few that I can think of right now. Correct me if I am wrong in my understanding of these.

  1. FitLibrary does not support the embedded table markup that Slim does. FitLibrary requires defined variables. This complicates some of the model based generators we have.
  2. Being able to expand and collapse Defined Action Calls on the page like you can with Scenarios called from scripts or decision tables. Defined Actions calls are only expanded or collapsed by editing the page and setting the correct show variable to true or false and so in that regard is somewhat more static.
  3. In some cases, I would like to use fitnesse converters within FitLibrary but parts of FitLibrary are not compatible with the latest fitnesse. Slim works with the latest fitnesse and its various features.
  4. In some cases I do want the cell markup passed through to the fixture, which Slim does but FitLibrary does not.
  5. I think it would be good if the FitLibrary acceptance tests (e.g. those in the specify package) ran under the latest fitnesse. The Slim tests run but the FitLibrary ones don't.
  6. In general, Slim has evolved with the latest fitnesse but FitLibrary has not. FitLibrary has a dependency on a 2011 version of fitnesse.
jediwhale commented 7 years ago

Thanks. This helps me understand how Slim and FitLibrary features are used.

On 2017-01-19 10:17, brucetrask wrote:

These are a few that I can think of right now. Correct me if I am wrong in my understanding of these.

  1. FitLibrary does not support the embedded table markup that Slim does. FitLibrary requires defined variables. This complicates some of the model based generators we have.
  2. Being able to expand and collapse Defined Action Calls on the page like you can with Scenarios called from scripts or decision tables. Defined Actions calls are only expanded or collapsed by editing the page and setting the correct show variable to true or false.
  3. In some cases, I would like to use fitnesse converters within FitLibrary but parts of FitLibrary are not compatible with the latest fitnesse. Slim works with the latest fitnesse and its various features.
  4. In some cases I do want the cell markup passed through to the fixture, which Slim does but FitLibrary does not.
  5. I think it would be good if the FitLibrary acceptance tests (e.g. those in the specify package) run under the latest fitnesse. The Slim tests run but the FitLibrary ones don't.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/unclebob/fitnesse/issues/1019#issuecomment-273838567, or mute the thread https://github.com/notifications/unsubscribe-auth/AACXYz0V7BqKVT2bwZQ1bOC3JZ8Cjgkjks5rT5qNgaJpZM4LnNlC.

six42 commented 7 years ago

Hi Brucetrask,

There is a hack to get different testsystems running from the same Slim page. FirNesse is using this to test itself.

Look at http://fitnesse.org/FitNesse.SuiteAcceptanceTests.SuiteSlimTests.IgnoredTestsShouldColorGray For an example. Change the definition of TestSystem to run against Fit.

The readability might not be what you need or users expect.

This could be a starting point /quick kill for your requirements.

brucetrask commented 7 years ago

@six42 Interesting. I had not looked at that test case before. I will have a look. Thanks.