Note that there are some explanatory texts on larger screens.

plurals
  1. POCan Fitnesse use a new process for every test in a suite
    primarykey
    data
    text
    <p>We often have Fitnesse tests that pass individually but fail when run as part of a suite (or vice versa).</p> <p>This is because some of the setup remains between each test. Is there a way to tell Fitnesse to use a new thread / process / whatever before running every test so that the tests were guaranteed to behave the same way in both cases.</p> <p>At the moment we use the Suite results in our continuous integration server which means that tests which would fail individually can get through to our releases. This is making us nervous!</p> <p>In the example below, an AlarmDefintionSet is the parent object of an AlarmDefinition. The AlarmDefinitionSetSetUpFixture creates an AlarmDefinitionSet and stores it in memory. The AlarmDefinitionFixture finds is parent in memory (this can be by an id, but in the example below it is using the default one), sets this as a property and then sets the Code, InitialWTGStopped and RunAlarm properties. It then calls the Valid and ValidationMessage methods as the test.</p> <p>This test works fine when run as part of a suite or on its own. However, if I were to remove the AlarmDefinitionSetSetUpFixture it would then fail when run on its own, as it wouldn't be able to find a suitable parent. However, if it was run as part of a suite, and an earlier test had included an AlarmDefinitionSetSetUpFixture, then it would pass. This is a mild simplification but it illustrates the relevant points. I could use the Fitnesse "[SuiteName].SetUpFixture" file to call a method which clears everything out of memory, and we may indeed do this. It will be a lot of work adding such a file to all of our suites and also ensure that the methods it calls correctly remove everything from memory.</p> <p><img src="https://i.stack.imgur.com/pRmV9.gif" alt="Example Fitnesse test"></p> <p>The fixtures in this example are all fit.ColumnFixture's</p> <p>Thanks ...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload